We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1829a3c commit 7e1a7abCopy full SHA for 7e1a7ab
Lib/test/test_trace.py
@@ -360,9 +360,14 @@ def tearDown(self):
360
rmtree(TESTFN)
361
unlink(TESTFN)
362
363
- def _coverage(self, tracer,
364
- cmd='import test.support, test.test_pprint;'
365
- 'test.support.run_unittest(test.test_pprint.QueryTestCase)'):
+ DEFAULT_SCRIPT = '''if True:
+ import unittest
+ from test.test_pprint import QueryTestCase
366
+ loader = unittest.TestLoader()
367
+ tests = loader.loadTestsFromTestCase(QueryTestCase)
368
+ tests(unittest.TestResult())
369
+ '''
370
+ def _coverage(self, tracer, cmd=DEFAULT_SCRIPT):
371
tracer.run(cmd)
372
r = tracer.results()
373
r.write_results(show_missing=True, summary=True, coverdir=TESTFN)
0 commit comments