Commit 5f1ecdc5 authored by Karen Tracey's avatar Karen Tracey
Browse files

Python 2.3 compatibility: Fixed a test to only run under 2.4+, since it fails...

Python 2.3 compatibility: Fixed a test to only run under 2.4+, since it fails due to a Ptyhon problem under 2.3.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@13032 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 33f097e5
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -973,6 +973,11 @@ class ManageValidate(AdminScriptTestCase):
    def test_broken_app(self):
        "manage.py validate reports an ImportError if an app's models.py raises one on import"
        self.write_settings('settings.py', apps=['admin_scripts.broken_app'])
        # Skip this test on Python 2.3, where a 2nd attempt to import a broken module won't raise
        # an error. Due to the way models modules are loaded and re-tried if the first attempt
        # fails, Django needs the 2nd attempt to fail, but on Python 2.3 that does not happen, thus
        # this function only works on higher levels of Python.
        if sys.version_info >= (2, 4):
            args = ['validate']
            out, err = self.run_manage(args)
            self.assertNoOutput(out)