]> granicus.if.org Git - python/commitdiff
Temporary fix: Module names are still 8bit strings. This
authorWalter Dörwald <walter@livinglogic.de>
Thu, 3 May 2007 21:11:35 +0000 (21:11 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Thu, 3 May 2007 21:11:35 +0000 (21:11 +0000)
change allows test_support.run_unittest(__name__) to work
again. However the proper fix would be module names that
are real unicode strings.

Lib/test/test_support.py

index 29a38522e0a83abbe79392a4883320b41e208d7b..d6aeb29d8e4b24e009c8833869246b5bf0e3a004 100644 (file)
@@ -534,7 +534,7 @@ def run_unittest(*classes):
     valid_types = (unittest.TestSuite, unittest.TestCase)
     suite = unittest.TestSuite()
     for cls in classes:
-        if isinstance(cls, str):
+        if isinstance(cls, (str, str8)):
             if cls in sys.modules:
                 suite.addTest(unittest.findTestCases(sys.modules[cls]))
             else: