Ticket #12658: 12658.diff

File 12658.diff, 814 bytes (added by Matthew Schinckel, 15 years ago)

Fix for syntax/import errors causing tests to be skipped.

  • django/test/simple.py

     
    7272        from imp import find_module
    7373        try:
    7474            mod = find_module(TEST_MODULE, [os.path.dirname(app_module.__file__)])
    75         except ImportError:
    76             # 'tests' module doesn't exist. Move on.
    77             test_module = None
     75        except ImportError, f:
     76            if f.args == e.args:
     77                # 'tests' module doesn't exist. Move on.
     78                test_module = None
     79            else:
     80                raise e
    7881        else:
    7982            # The module exists, so there must be an import error in the
    8083            # test module itself. We don't need the module; so if the
Back to Top