#16388: django unittest bug --------------------------------------+----------------------------------- Reporter: freewave@… | Owner: nobody Type: Bug | Status: new Milestone: | Component: Testing framework Version: 1.3 | Severity: Normal Resolution: | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | --------------------------------------+-----------------------------------
Old description: > enviroment: python2.7 + django1.3 > with the steps below: > 1、 django-admin.py startproject myapp > 2、 cd myapp > 3、 manage.py startapp foo > 4、 manage.py test > > error occurs: > File "C:\Python27\lib\site-packages\django\test\simple.py", line 237, in > setup_test_environment > unittest.installHandler() > AttributeError:'module' object has no attribute 'installHandler' > > problem?: > the file “site-packages\django\utils\unittest” contains the code > try: > # 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 * > else: > ... > > but unittest2 features are native in Python 2.7? New description: enviroment: python2.7 + django1.3 with the steps below: - 1 django-admin.py startproject myapp - 2 cd myapp - 3 manage.py startapp foo - 4 manage.py test error occurs: {{{ File "C:\Python27\lib\site-packages\django\test\simple.py", line 237, in setup_test_environment unittest.installHandler() AttributeError:'module' object has no attribute 'installHandler' }}} problem?: the file “site-packages\django\utils\unittest” contains the code {{{ try: # 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 * else: ... }}} but unittest2 features are native in Python 2.7? -- Comment (by aaugustin): Fixed formatting, just to be able to read the bug report — please use the preview before submitting a bug. -- Ticket URL: <https://code.djangoproject.com/ticket/16388#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.