summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_cpickle.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-12-19 16:42:15 (GMT)
committerFred Drake <fdrake@acm.org>2001-12-19 16:42:15 (GMT)
commit694ed091af3b83b32ef161bd333c042a0ddacc88 (patch)
treec11c05820d70718575cf53afa583bca9c8a852a7 /Lib/test/test_cpickle.py
parent1444f67fa0248d80b5c6de14443e56d05b314227 (diff)
downloadcpython-694ed091af3b83b32ef161bd333c042a0ddacc88.zip
cpython-694ed091af3b83b32ef161bd333c042a0ddacc88.tar.gz
cpython-694ed091af3b83b32ef161bd333c042a0ddacc88.tar.bz2
Fix the test control support for the pickle & cPickle tests so the tests run
under regrtest.
Diffstat (limited to 'Lib/test/test_cpickle.py')
-rw-r--r--Lib/test/test_cpickle.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/Lib/test/test_cpickle.py b/Lib/test/test_cpickle.py
index 8047bc5..dda606f 100644
--- a/Lib/test/test_cpickle.py
+++ b/Lib/test/test_cpickle.py
@@ -1,7 +1,8 @@
import cPickle
+import test_support
+import unittest
from cStringIO import StringIO
from pickletester import AbstractPickleTests, AbstractPickleModuleTests
-from test_support import run_unittest
class cPickleTests(AbstractPickleTests, AbstractPickleModuleTests):
@@ -79,8 +80,14 @@ class cPickleFastPicklerTests(AbstractPickleTests):
AbstractPickleTests.test_recursive_multi,
self)
+def test_main():
+ loader = unittest.TestLoader()
+ suite = unittest.TestSuite()
+ suite.addTest(loader.loadTestsFromTestCase(cPickleTests))
+ suite.addTest(loader.loadTestsFromTestCase(cPicklePicklerTests))
+ suite.addTest(loader.loadTestsFromTestCase(cPickleListPicklerTests))
+ suite.addTest(loader.loadTestsFromTestCase(cPickleFastPicklerTests))
+ test_support.run_suite(suite)
+
if __name__ == "__main__":
- run_unittest(cPickleTests)
- run_unittest(cPicklePicklerTests)
- run_unittest(cPickleListPicklerTests)
- run_unittest(cPickleFastPicklerTests)
+ test_main()