summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-03-18 01:17:48 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-03-18 01:17:48 +0000
commitfa852966c6c6a0e42eddbb6eb604c1c7754c7903 (patch)
tree21082b39d2396314966ab2e0783a0f07ec9e781a
parent5347bbd5146272bb8e8a0a7b849e323c3783e9c0 (diff)
Fixed #15368 -- Ensure that raw unittest TestCase instances can be invoked individually by the test runner. Thanks to SmileyChris for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/test/simple.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/test/simple.py b/django/test/simple.py
index c1230678a7..d0b9a70257 100644
--- a/django/test/simple.py
+++ b/django/test/simple.py
@@ -1,3 +1,4 @@
+import unittest as real_unittest
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models import get_app, get_apps
@@ -113,7 +114,7 @@ def build_test(label):
TestClass = getattr(test_module, parts[1], None)
try:
- if issubclass(TestClass, unittest.TestCase):
+ if issubclass(TestClass, (unittest.TestCase, real_unittest.TestCase)):
if len(parts) == 2: # label is app.TestClass
try:
return unittest.TestLoader().loadTestsFromTestCase(TestClass)