summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2020-01-16 09:42:09 -0500
committerNed Batchelder <ned@nedbatchelder.com>2020-01-16 09:42:09 -0500
commit79c1444e52af2b2645808b242801a785b0788f49 (patch)
tree7369d242ce9b0e4e99065ffa27665dd383675a26
parent0643e35348e8735c4f2c3909871d5a146998d77f (diff)
downloadpython-coveragepy-git-nedbat/bug919.tar.gz
A test to demonstrate #919nedbat/bug919
-rw-r--r--tests/test_process.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 6ca4571c..47d8077f 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -983,6 +983,14 @@ class EnvironmentTest(CoverageTest):
actual = self.run_command("python {} run run_me.py".format(cov_main))
self.assert_tryexecfile_output(expected, actual)
+ def test_dashm_coverage_is_like_python(self):
+ # https://github.com/nedbat/coveragepy/issues/919
+ with open(TRY_EXECFILE) as f:
+ self.make_file("else/where/run_me.py", f.read())
+ expected = self.run_command("python else/where/run_me.py")
+ actual = self.run_command("python -m coverage run else/where/run_me.py")
+ self.assert_tryexecfile_output(expected, actual)
+
def test_coverage_custom_script(self):
# https://github.com/nedbat/coveragepy/issues/678
# If sys.path[0] isn't the Python default, then coverage.py won't