Commit 67ef5910 authored by Berker Peksag's avatar Berker Peksag

Issue #14235: Use importlib.reload() in test_cmd.test_coverage.

parent bb458dbe
...@@ -229,7 +229,7 @@ def test_coverage(coverdir): ...@@ -229,7 +229,7 @@ def test_coverage(coverdir):
trace = support.import_module('trace') trace = support.import_module('trace')
tracer=trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,], tracer=trace.Trace(ignoredirs=[sys.base_prefix, sys.base_exec_prefix,],
trace=0, count=1) trace=0, count=1)
tracer.run('reload(cmd);test_main()') tracer.run('import importlib; importlib.reload(cmd); test_main()')
r=tracer.results() r=tracer.results()
print("Writing coverage results...") print("Writing coverage results...")
r.write_results(show_missing=True, summary=True, coverdir=coverdir) r.write_results(show_missing=True, summary=True, coverdir=coverdir)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment