mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
gh-111426: Remove test_cmd.test_coverage (#111427)
This commit is contained in:
parent
81bc802a46
commit
66bea2555d
1 changed files with 1 additions and 11 deletions
|
|
@ -248,19 +248,9 @@ def load_tests(loader, tests, pattern):
|
||||||
tests.addTest(doctest.DocTestSuite())
|
tests.addTest(doctest.DocTestSuite())
|
||||||
return tests
|
return tests
|
||||||
|
|
||||||
def test_coverage(coverdir):
|
|
||||||
trace = support.import_module('trace')
|
|
||||||
tracer=trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,],
|
|
||||||
trace=0, count=1)
|
|
||||||
tracer.run('import importlib; importlib.reload(cmd); test_main()')
|
|
||||||
r=tracer.results()
|
|
||||||
print("Writing coverage results...")
|
|
||||||
r.write_results(show_missing=True, summary=True, coverdir=coverdir)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if "-c" in sys.argv:
|
if "-i" in sys.argv:
|
||||||
test_coverage('/tmp/cmd.cover')
|
|
||||||
elif "-i" in sys.argv:
|
|
||||||
samplecmdclass().cmdloop()
|
samplecmdclass().cmdloop()
|
||||||
else:
|
else:
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue