Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#13469 closed (fixed)

1.1.X test failures on Python 2.3 after r13085

Reported by: kmtracey Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

r13085 introduced a couple of tests that fail when run under Python 2.3:

C:\u\kmt\django\branch1.1.X\tests>"\bin\Python 23\python.exe" runtests.py --settings=testdb.sqlite utils
======================================================================
FAIL: Modules deep inside an egg can still be tested for existence
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\u\kmt\django\branch1.1.X\tests\regressiontests\utils\module_loading.py", line 67, in test_deep_loader
    self.assertRaises(ImportError, import_module, 'egg_module.sub1.sub2.bad_module')
  File "C:\bin\Python23\lib\unittest.py", line 295, in failUnlessRaises
    raise self.failureException, excName
AssertionError: ImportError

======================================================================
FAIL: Module existence can be tested inside eggs
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\u\kmt\django\branch1.1.X\tests\regressiontests\utils\module_loading.py", line 48, in test_shallow_loader
    self.assertRaises(ImportError, import_module, 'egg_module.bad_module')
  File "C:\bin\Python23\lib\unittest.py", line 295, in failUnlessRaises
    raise self.failureException, excName
AssertionError: ImportError

----------------------------------------------------------------------
Ran 36 tests in 0.109s

FAILED (failures=2)

We've previously "fixed" (by simply skipping the tests under Python 2.3) a couple of problems where Python 2.3 won't raise an ImportError on an attempt to re-import a module that raises an error (see r13022, r13032), but I have not had time to figure out if that is what is happening here or if there is something else going on.

Attachments (2)

t13469.diff (2.8 KB) - added by russellm 5 years ago.
Possible fix for Python2.3 failures
t13469.2.diff (3.4 KB) - added by russellm 5 years ago.
Possible fix for Python2.3 issues

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by russellm

  • Component changed from Uncategorized to Core framework
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

Changed 5 years ago by russellm

Possible fix for Python2.3 failures

Changed 5 years ago by russellm

Possible fix for Python2.3 issues

comment:2 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(In [13095]) Fixed #13469 -- Cleaned up the test case from r13085, and added some cache cleanup that matters for Python 2.3. Thanks to Karen and Alex for their help.

comment:3 Changed 5 years ago by russellm

(In [13096]) [1.1.X] Fixed #13469 -- Cleaned up the test case from r13085, and added some cache cleanup that matters for Python 2.3. Thanks to Karen and Alex for their help.

Backport of r13095 from trunk.

comment:4 Changed 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

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