Opened 9 years ago

Last modified 9 years ago

#16388 closed Bug

django unittest bug — at Version 2

Reported by: freewave@… Owned by: nobody
Component: Testing framework Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Aymeric Augustin)

enviroment: python2.7 + django1.3
with the steps below:

  • 1 startproject myapp
  • 2 cd myapp
  • 3 startapp foo
  • 4 test

error occurs:

File "C:\Python27\lib\site-packages\django\test\", line 237, in setup_test_environment
AttributeError:'module' object has no attribute 'installHandler'

the file “site-packages\django\utils\unittest” contains the code

    # check the system path first
    from unittest2 import *
except ImportError:
    if sys.version_info >= (2,7):
        # unittest2 features are native in Python 2.7
        from unittest import *

but unittest2 features are native in Python 2.7?

Change History (2)

comment:1 Changed 9 years ago by Bernhard Essl

I can't reproduce this error on my Windows XP virtual machine.

comment:2 Changed 9 years ago by Aymeric Augustin

Description: modified (diff)

Fixed formatting, just to be able to read the bug report — please use the preview before submitting a bug.

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