summaryrefslogtreecommitdiff
path: root/test/test_execfile.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_execfile.py')
-rw-r--r--test/test_execfile.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_execfile.py b/test/test_execfile.py
index d46732d2..60ef1952 100644
--- a/test/test_execfile.py
+++ b/test/test_execfile.py
@@ -34,3 +34,17 @@ class RunTest(CoverageTest):
# Argv should have the proper values.
self.assertEqual(mod_globs['argv'], [tryfile, "arg1", "arg2"])
+
+ def test_no_c_file(self):
+ self.makeFile("mycode.py", """\
+ a = 1
+ b = 2
+ if b == 3:
+ c = 4
+ d = 5
+ """)
+
+ self.assert_(not os.path.exists(".coverage"))
+ self.run_command("coverage -x mycode.py")
+ self.assert_(os.path.exists(".coverage"))
+ \ No newline at end of file