[issue31908] trace module cli does not write cover files
Michael Selik
report at bugs.python.org
Mon Nov 13 17:43:51 EST 2017
Michael Selik <mike at selik.org> added the comment:
You're referring to something like this:
+ def test_count_and_summary(self):
+ name = TESTFN + '.py'
+ with open(name, 'w') as fd:
+ self.addCleanup(unlink, name)
+ fd.write("""\
+x = 1
+y = 2
+
+def f():
+ return x + y
+
+for i in range(10):
+ f()
+ """)
+ status, stdout, stderr = assert_python_ok('-m', 'trace', '-cs', name)
+ self.assertEqual(status, 0)
+ self.assertIn(b'lines cov% module (path)', stdout)
+ self.assertIn(('6 100%% %s (%s)' % (TESTFN, name)).encode(), stdout)
+
?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31908>
_______________________________________
More information about the Python-bugs-list
mailing list