summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-26 13:10:58 (GMT)
committerGitHub <noreply@github.com>2023-10-26 13:10:58 (GMT)
commit78c6faee08eb832b6eafe85340ca95e1e92f6402 (patch)
tree602aae909385ab456ed605542359c4dfad35eb0c
parent7cce26bcd99d444878c211767794b72bc791ff97 (diff)
downloadcpython-78c6faee08eb832b6eafe85340ca95e1e92f6402.zip
cpython-78c6faee08eb832b6eafe85340ca95e1e92f6402.tar.gz
cpython-78c6faee08eb832b6eafe85340ca95e1e92f6402.tar.bz2
[3.12] gh-111348: Fix direct invocation of `test_doctest`; remove `test_doctest.test_coverage` (GH-111349) (#111359)
gh-111348: Fix direct invocation of `test_doctest`; remove `test_doctest.test_coverage` (GH-111349) (cherry picked from commit 31c05b72c15885ad5ff298de39456d8baed28448) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
-rw-r--r--Lib/test/test_doctest.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py
index 20059d3..09c378f 100644
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -3318,19 +3318,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')