Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#13469 closed (fixed)

1.1.X test failures on Python 2.3 after r13085

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

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 Russell Keith-Magee 15 years ago.
Possible fix for Python2.3 failures
t13469.2.diff (3.4 KB ) - added by Russell Keith-Magee 15 years ago.
Possible fix for Python2.3 issues

Download all attachments as: .zip

Change History (6)

comment:1 by Russell Keith-Magee, 15 years ago

Component: UncategorizedCore framework
Triage Stage: UnreviewedAccepted

by Russell Keith-Magee, 15 years ago

Attachment: t13469.diff added

Possible fix for Python2.3 failures

by Russell Keith-Magee, 15 years ago

Attachment: t13469.2.diff added

Possible fix for Python2.3 issues

comment:2 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(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 by Russell Keith-Magee, 15 years ago

(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 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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