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.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_execfile.py b/test/test_execfile.py
index 1dde705..5e9f4fd 100644
--- a/test/test_execfile.py
+++ b/test/test_execfile.py
@@ -3,6 +3,7 @@
import os, sys
from coverage.execfile import run_python_file
+from coverage.misc import NoSource
sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k
from coveragetest import CoverageTest
@@ -59,3 +60,5 @@ class RunTest(CoverageTest):
run_python_file('nl.py', ['nl.py'])
self.assertEqual(self.stdout(), "Hello, world!\n"*3)
+ def test_no_such_file(self):
+ self.assertRaises(NoSource, run_python_file, "xyzzy.py", [])