From: Walter Dörwald Date: Fri, 4 May 2007 07:18:10 +0000 (+0000) Subject: Use basestring instead of (str, str8) to test whether X-Git-Tag: v3.0a1~1020 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf58bd6ddb1d6dd9aa80319886db744a802f4345;p=thirdparty%2FPython%2Fcpython.git Use basestring instead of (str, str8) to test whether cls is a module *name*. --- diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index d6aeb29d8e4b..57b1db3919de 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -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, str8)): + if isinstance(cls, basestring): if cls in sys.modules: suite.addTest(unittest.findTestCases(sys.modules[cls])) else: