Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30809 closed Bug (invalid)

test_clear_site_cache consistently hangs up / fails when running all tests

Reported by: Neil Strain Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords: tests, unit tests
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

  • Python 3.6.9 virtual environment
  • tests/runtests.py -v3:
Make sure passing the wrong kinds of arguments outputs an error and prints usage ... ok
test_output_normal (test_runner.test_debug_sql.TestDebugSQL) ... ok
test_output_verbose (test_runner.test_debug_sql.TestDebugSQL) ... ok
^C
======================================================================
FAIL: test_clear_site_cache (sites_tests.tests.SitesFrameworkTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/nstrain/.pyenv/versions/3.6.9/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/Users/nstrain/.pyenv/versions/3.6.9/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/Users/nstrain/Projects/django/django/test/utils.py", line 370, in inner
    return func(*args, **kwargs)
  File "/Users/nstrain/Projects/django/tests/sites_tests/tests.py", line 162, in test_clear_site_cache
    self.assertEqual(models.SITE_CACHE, {})
  File "/Users/nstrain/.pyenv/versions/3.6.9/lib/python3.6/unittest/case.py", line 829, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/Users/nstrain/.pyenv/versions/3.6.9/lib/python3.6/unittest/case.py", line 1121, in assertDictEqual
    self.fail(self._formatMessage(msg, standardMsg))
  File "/Users/nstrain/.pyenv/versions/3.6.9/lib/python3.6/unittest/case.py", line 670, in fail
    raise self.failureException(msg)
AssertionError: {2: <Site: example2.com>, 'example2.com': <Site: example2.com>} != {}
- {2: <Site: example2.com>, 'example2.com': <Site: example2.com>}
+ {}

----------------------------------------------------------------------
Ran 13034 tests in 226.191s

FAILED (failures=1, skipped=987, expected failures=4)
  • Tests appear to hang up on this test and error message prints after Ctrl+C interrupt.
  • The affected test passes when running sites_tests.tests.SitesFrameworkTests or just this test by itself.

Change History (2)

comment:1 by Neil Strain, 5 years ago

Resolution: wontfix
Status: newclosed

This test passes after setting up a new virtual environment with Python 3.7.4.

comment:2 by Mariusz Felisiak, 5 years ago

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