summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_trace.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-08-25 07:27:55 (GMT)
committerGitHub <noreply@github.com>2018-08-25 07:27:55 (GMT)
commitc406d5cd74002964a64c3eb7d9e2445a7fd3a03f (patch)
treed762f8be37e446fecb49d58c4148f81d225c2457 /Lib/test/test_trace.py
parent8fdd331bbf7e60dd81c02c7077f44c7939e2a05d (diff)
downloadcpython-c406d5cd74002964a64c3eb7d9e2445a7fd3a03f.zip
cpython-c406d5cd74002964a64c3eb7d9e2445a7fd3a03f.tar.gz
cpython-c406d5cd74002964a64c3eb7d9e2445a7fd3a03f.tar.bz2
bpo-34171: Prevent creating Lib/trace.cover when run the trace module. (GH-8841)
Diffstat (limited to 'Lib/test/test_trace.py')
-rw-r--r--Lib/test/test_trace.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py
index dc9b3fa..3b335ca 100644
--- a/Lib/test/test_trace.py
+++ b/Lib/test/test_trace.py
@@ -387,6 +387,11 @@ class TestCoverageCommandLineOutput(unittest.TestCase):
def test_cover_files_written_no_highlight(self):
argv = '-m trace --count'.split() + [self.codefile]
status, stdout, stderr = assert_python_ok(*argv)
+ self.assertEqual(stderr, b'')
+ tracedir = os.path.dirname(os.path.abspath(trace.__file__))
+ tracecoverpath = os.path.join(tracedir, "trace.cover")
+ self.assertFalse(os.path.exists(tracecoverpath))
+
self.assertTrue(os.path.exists(self.coverfile))
with open(self.coverfile) as f:
self.assertEqual(f.read(),