diff options
Diffstat (limited to 'test/test_process.py')
-rw-r--r-- | test/test_process.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_process.py b/test/test_process.py index 47f3a088..a4e1a09d 100644 --- a/test/test_process.py +++ b/test/test_process.py @@ -6,6 +6,7 @@ import coverage sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k from coveragetest import CoverageTest +here = os.path.dirname(__file__) class ProcessTest(CoverageTest): """Tests of the per-process behavior of coverage.py.""" @@ -220,6 +221,12 @@ class ProcessTest(CoverageTest): self.assertEqual(status, status2) self.assertEqual(status, 0) + def test_coverage_run_is_like_python(self): + tryfile = os.path.join(here, "try_execfile.py") + self.make_file("run_me.py", open(tryfile).read()) + out = self.run_command("coverage run run_me.py") + out2 = self.run_command("python run_me.py") + self.assertMultiLineEqual(out, out2) if hasattr(os, 'fork'): def test_fork(self): |