[Python-checkins] cpython (merge 3.3 -> default): Issue #17463: Fix test discovery for test_pdb.py
andrew.svetlov
python-checkins at python.org
Mon Mar 18 18:10:25 CET 2013
http://hg.python.org/cpython/rev/30530f6c24bb
changeset: 82731:30530f6c24bb
parent: 82729:0842c5411ed6
parent: 82730:50af6682c6a7
user: Andrew Svetlov <andrew.svetlov at gmail.com>
date: Mon Mar 18 10:10:08 2013 -0700
summary:
Issue #17463: Fix test discovery for test_pdb.py
files:
Lib/test/test_pdb.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -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 @@
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()
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list