diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2020-01-16 09:42:09 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2020-01-16 09:42:09 -0500 |
commit | 79c1444e52af2b2645808b242801a785b0788f49 (patch) | |
tree | 7369d242ce9b0e4e99065ffa27665dd383675a26 /tests | |
parent | 0643e35348e8735c4f2c3909871d5a146998d77f (diff) | |
download | python-coveragepy-git-nedbat/bug919.tar.gz |
A test to demonstrate #919nedbat/bug919
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_process.py | 8 |
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 |