gh-111348: Fix direct invocation of `test_doctest`; remove `test_doctest.test_coverage` (#111349)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
This commit is contained in:
Nikita Sobolev 2023-10-26 15:45:39 +03:00 committed by GitHub
parent b0699aa544
commit 31c05b72c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 15 deletions

View File

@ -3362,19 +3362,5 @@ def load_tests(loader, tests, pattern):
return tests
def test_coverage(coverdir):
trace = import_helper.import_module('trace')
tracer = trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,],
trace=0, count=1)
tracer.run('test_main()')
r = tracer.results()
print('Writing coverage results...')
r.write_results(show_missing=True, summary=True,
coverdir=coverdir)
if __name__ == '__main__':
if '-c' in sys.argv:
test_coverage('/tmp/doctest.cover')
else:
unittest.main()
unittest.main(module='test.test_doctest')