]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-111426: Remove `test_cmd.test_coverage` (GH-111427) (#111432)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 28 Oct 2023 23:40:02 +0000 (01:40 +0200)
committerGitHub <noreply@github.com>
Sat, 28 Oct 2023 23:40:02 +0000 (23:40 +0000)
gh-111426: Remove `test_cmd.test_coverage` (GH-111427)
(cherry picked from commit 66bea2555dc7b3dd18282cc699fe9a22dea50de3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Lib/test/test_cmd.py

index 319801c71f776bbede8410e48926df74feb43bad..28f80766677e59224ee74ccf38762289a7c11ac8 100644 (file)
@@ -248,19 +248,9 @@ def load_tests(loader, tests, pattern):
     tests.addTest(doctest.DocTestSuite())
     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 "-c" in sys.argv:
-        test_coverage('/tmp/cmd.cover')
-    elif "-i" in sys.argv:
+    if "-i" in sys.argv:
         samplecmdclass().cmdloop()
     else:
         unittest.main()