Commits

Anonymous committed 1900d55

Fixed #15368 -- Ensure that raw unittest TestCase instances can be invoked individually by the test runner. Thanks to SmileyChris for the report and patch.

Comments (0)

Files changed (1)

django/test/simple.py

+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
             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)