Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30810 closed Bug (fixed)

WatchmanReloaderTests.test_setting_timeout_from_environment_variable() fails with AttributeError.

Reported by: Poli García Owned by: nobody
Component: Utilities Version: 2.2
Severity: Normal Keywords: utilities, autoreloader, watchman
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Poli García)

Running Django's test suite errors with:

======================================================================
ERROR: test_setting_timeout_from_environment_variable (utils_tests.test_autoreload.WatchmanReloaderTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 628, in run
    testMethod()
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/mock.py", line 1626, in _inner
    return f(*args, **kw)
  File "/Users/poli/work/django/django/tests/utils_tests/test_autoreload.py", line 654, in test_setting_timeout_from_environment_variable
    self.assertEqual(self.RELOADER_CLS.client_timeout, 10)
AttributeError: type object 'WatchmanReloader' has no attribute 'client_timeout'

My environment:

  • Mac OSX 10.14.16
  • Python 3.7.4
  • watchman 4.9.0

The WatchmanReloaderTests are marked with skip_unless_watchman_available, so you'll need watchman to be able to reproduce this.

Change History (6)

comment:1 by Poli García, 5 years ago

Description: modified (diff)
Summary: WatchmanReloaderTests fail with AttributeError: type object 'WatchmanReloader' has no attribute 'client_timeout'WatchmanReloaderTests error with AttributeError: type object 'WatchmanReloader' has no attribute 'client_timeout'

comment:2 by Poli García, 5 years ago

Type: UncategorizedBug

comment:3 by Mariusz Felisiak, 5 years ago

Has patch: set
Summary: WatchmanReloaderTests error with AttributeError: type object 'WatchmanReloader' has no attribute 'client_timeout'WatchmanReloaderTests.test_setting_timeout_from_environment_variable() fails with AttributeError.
Triage Stage: UnreviewedAccepted
Version: master2.2

comment:4 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: newclosed

In 2fd610eb:

Fixed #30810 -- Fixed WatchmanReloaderTests.test_setting_timeout_from_environment_variable test.

client_timeout is an instance attribute.

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 49dcb5d3:

[3.0.x] Fixed #30810 -- Fixed WatchmanReloaderTests.test_setting_timeout_from_environment_variable test.

client_timeout is an instance attribute.

Backport of 2fd610eb301dc01e100befed891e8007fd2e981f from master

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 38af2579:

[2.2.x] Fixed #30810 -- Fixed WatchmanReloaderTests.test_setting_timeout_from_environment_variable test.

client_timeout is an instance attribute.

Backport of 2fd610eb301dc01e100befed891e8007fd2e981f from master

Note: See TracTickets for help on using tickets.
Back to Top