]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport addition of the __all__ attribute for unittest.py
authorRaymond Hettinger <python@rcn.com>
Tue, 16 Sep 2003 04:55:32 +0000 (04:55 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 16 Sep 2003 04:55:32 +0000 (04:55 +0000)
Lib/test/test___all__.py
Lib/unittest.py

index 8e2fd46aa4965fdcf178630448b36009ea253547..6643a1984a1b896aadae6a1b981fbb2505ce0abc 100644 (file)
@@ -59,7 +59,7 @@ class AllTest(unittest.TestCase):
         self.check_all("ConfigParser")
         self.check_all("Cookie")
         self.check_all("MimeWriter")
-        self.check_all("Queue")        
+        self.check_all("Queue")
         self.check_all("SimpleHTTPServer")
         self.check_all("SocketServer")
         self.check_all("StringIO")
@@ -174,6 +174,7 @@ class AllTest(unittest.TestCase):
         self.check_all("tokenize")
         self.check_all("traceback")
         self.check_all("tty")
+        self.check_all("unittest")
         self.check_all("urllib")
         self.check_all("urlparse")
         self.check_all("uu")
index d033936d2d0c36c352b64a9938c027327f1af51d..043b9a848a4f824e02504b66f0157c57571552dd 100644 (file)
@@ -55,6 +55,16 @@ import string
 import os
 import types
 
+##############################################################################
+# Exported classes and functions
+##############################################################################
+__all__ = ['TestResult', 'TestCase', 'TestSuite', 'TextTestRunner',
+           'TestLoader', 'FunctionTestCase', 'main', 'defaultTestLoader']
+
+# Expose obsolete functions for backwards compatability
+__all__.extend(['getTestCaseNames', 'makeSuite', 'findTestCases'])
+
+
 ##############################################################################
 # Test framework core
 ##############################################################################