]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #17463: Fix test discovery for test_pdb.py
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 18 Mar 2013 17:09:50 +0000 (10:09 -0700)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Mon, 18 Mar 2013 17:09:50 +0000 (10:09 -0700)
Lib/test/test_pdb.py

index 4fb07a3cc0fabec928f4a7a199222313c6ea89fe..03084e4d122ed2828653110a32f801092a2abb3c 100644 (file)
@@ -1,5 +1,6 @@
 # A test suite for pdb; not very comprehensive at the moment.
 
+import doctest
 import imp
 import pdb
 import sys
@@ -701,11 +702,11 @@ class PdbTestCase(unittest.TestCase):
         support.unlink(support.TESTFN)
 
 
-def test_main():
+def load_tests(*args):
     from test import test_pdb
-    support.run_doctest(test_pdb, verbosity=True)
-    support.run_unittest(PdbTestCase)
+    suites = [unittest.makeSuite(PdbTestCase), doctest.DocTestSuite(test_pdb)]
+    return unittest.TestSuite(suites)
 
 
 if __name__ == '__main__':
-    test_main()
+    unittest.main()