From: Victor Stinner Date: Wed, 30 Sep 2015 22:53:09 +0000 (+0200) Subject: Fix regrtest --coverage on Windows X-Git-Tag: v3.6.0a1~1365 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a53a818c3c67c927bcf8ee118fd29e21045dd9ab;p=python Fix regrtest --coverage on Windows Issue #25260: Fix ``python -m test --coverage`` on Windows. Remove the list of ignored directories. --- diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py index e1a99fb50b..c1ce3b179f 100644 --- a/Lib/test/libregrtest/main.py +++ b/Lib/test/libregrtest/main.py @@ -272,10 +272,7 @@ class Regrtest: def run_tests_sequential(self): if self.ns.trace: import trace - self.tracer = trace.Trace(ignoredirs=[sys.base_prefix, - sys.base_exec_prefix, - tempfile.gettempdir()], - trace=False, count=True) + self.tracer = trace.Trace(trace=False, count=True) save_modules = sys.modules.keys() diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 897598dddc..0f5f22ca4e 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -605,8 +605,6 @@ class ArgsTestCase(BaseTestCase): % (self.TESTNAME_REGEX, len(tests))) self.check_line(output, regex) - @unittest.skipIf(sys.platform == 'win32', - "FIXME: coverage doesn't work on Windows") def test_coverage(self): # test --coverage test = self.create_test() diff --git a/Misc/NEWS b/Misc/NEWS index 72d6fef778..a1aa269c70 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -157,6 +157,9 @@ Documentation Tests ----- +- Issue #25260: Fix ``python -m test --coverage`` on Windows. Remove the + list of ignored directories. + - PCbuild\rt.bat now accepts an unlimited number of arguments to pass along to regrtest.py. Previously there was a limit of 9.