Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #15368 -- Ensure that raw unittest TestCase instances can be in…

…voked 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
  • Loading branch information...
commit fa852966c6c6a0e42eddbb6eb604c1c7754c7903 1 parent 5347bbd
Russell Keith-Magee authored March 18, 2011

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/test/simple.py
3  django/test/simple.py
... ...
@@ -1,3 +1,4 @@
  1
+import unittest as real_unittest
1 2
 from django.conf import settings
2 3
 from django.core.exceptions import ImproperlyConfigured
3 4
 from django.db.models import get_app, get_apps
@@ -113,7 +114,7 @@ def build_test(label):
113 114
             TestClass = getattr(test_module, parts[1], None)
114 115
 
115 116
     try:
116  
-        if issubclass(TestClass, unittest.TestCase):
  117
+        if issubclass(TestClass, (unittest.TestCase, real_unittest.TestCase)):
117 118
             if len(parts) == 2: # label is app.TestClass
118 119
                 try:
119 120
                     return unittest.TestLoader().loadTestsFromTestCase(TestClass)

0 notes on commit fa85296

Please sign in to comment.
Something went wrong with that request. Please try again.