From 67ef591045217b87fcb4c1ed2cc94326df685901 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Mon, 30 Jun 2014 04:04:52 +0300 Subject: [PATCH] Issue #14235: Use importlib.reload() in test_cmd.test_coverage. --- Lib/test/test_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_cmd.py b/Lib/test/test_cmd.py index e9a0211682a..0c31454456d 100644 --- a/Lib/test/test_cmd.py +++ b/Lib/test/test_cmd.py @@ -229,7 +229,7 @@ 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('reload(cmd);test_main()') + 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)