summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-09-16 04:55:32 +0000
committerRaymond Hettinger <python@rcn.com>2003-09-16 04:55:32 +0000
commit675bac026e8df0d8a787dd7f88fa82e04ee70191 (patch)
tree19d2d315ee378045ded856319291b8c645aa920e
parentc866ac776c65799fc55da397c582ea583330ea9c (diff)
downloadcpython-git-675bac026e8df0d8a787dd7f88fa82e04ee70191.tar.gz
Backport addition of the __all__ attribute for unittest.py
-rw-r--r--Lib/test/test___all__.py3
-rw-r--r--Lib/unittest.py10
2 files changed, 12 insertions, 1 deletions
diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py
index 8e2fd46aa4..6643a1984a 100644
--- a/Lib/test/test___all__.py
+++ b/Lib/test/test___all__.py
@@ -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")
diff --git a/Lib/unittest.py b/Lib/unittest.py
index d033936d2d..043b9a848a 100644
--- a/Lib/unittest.py
+++ b/Lib/unittest.py
@@ -56,6 +56,16 @@ 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
##############################################################################