mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue 24215: Added tests for more builtin types in test_pprint.
Made test_pprint and test_trace discoverable.
This commit is contained in:
commit
1f507a8140
2 changed files with 12 additions and 17 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue