Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #14486 -- Modified the import order for the bundled unittest so…

… that a locally installed unittest2 (which will have more features) will supersede the Python 2.7 native version. Thanks to Michael Foord for the suggestion.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f657079c701b56e169142c8b89f9a578972cf11b 1 parent 8cb4bf5
Russell Keith-Magee freakboy3742 authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 django/utils/unittest/__init__.py
16 django/utils/unittest/__init__.py
View
@@ -30,14 +30,14 @@
# Django hackery to load the appropriate version of unittest
-if sys.version_info >= (2,7):
- # unittest2 features are native in Python 2.7
- from unittest import *
-else:
- try:
- # check the system path first
- from unittest2 import *
- except ImportError:
+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:
# otherwise use our bundled version
__all__ = ['TestResult', 'TestCase', 'TestSuite',
'TextTestRunner', 'TestLoader', 'FunctionTestCase', 'main',
Please sign in to comment.
Something went wrong with that request. Please try again.