summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_trace.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-20 16:38:05 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-20 16:38:05 (GMT)
commit1f507a81405dd7234dd97465d68fcc8437b5da0e (patch)
treee3b25316c9538b53bc7e73bb13ac9f1f4a801095 /Lib/test/test_trace.py
parentf54bcfb835d49c3f7c61bd9a7637bef1c6890166 (diff)
parentcbfe07e06cb460986b37604bc32dad407cb33f62 (diff)
downloadcpython-1f507a81405dd7234dd97465d68fcc8437b5da0e.zip
cpython-1f507a81405dd7234dd97465d68fcc8437b5da0e.tar.gz
cpython-1f507a81405dd7234dd97465d68fcc8437b5da0e.tar.bz2
Issue 24215: Added tests for more builtin types in test_pprint.
Made test_pprint and test_trace discoverable.
Diffstat (limited to 'Lib/test/test_trace.py')
-rw-r--r--Lib/test/test_trace.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index 2f2c584..03dff84 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -1,8 +1,7 @@
import os
import io
import sys
-from test.support import (run_unittest, TESTFN, rmtree, unlink,
- captured_stdout)
+from test.support import TESTFN, rmtree, unlink, captured_stdout
import unittest
import trace
@@ -301,7 +300,8 @@ class TestCoverage(unittest.TestCase):
unlink(TESTFN)
def _coverage(self, tracer,
- cmd='from test import test_pprint; test_pprint.test_main()'):
+ cmd='import test.support, test.test_pprint;'
+ 'test.support.run_unittest(test.test_pprint.QueryTestCase)'):
tracer.run(cmd)
r = tracer.results()
r.write_results(show_missing=True, summary=True, coverdir=TESTFN)
@@ -411,9 +411,5 @@ class TestDeprecatedMethods(unittest.TestCase):
trace.find_executable_linenos(fd.name)
-def test_main():
- run_unittest(__name__)
-
-
if __name__ == '__main__':
- test_main()
+ unittest.main()