summaryrefslogtreecommitdiff
path: root/test/test_execfile.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-22 07:22:56 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-22 07:22:56 -0400
commitff9099051e0daff7b08035713eeca5696ab3217a (patch)
tree13a391e9010e9e0b99ff403ec2fd0252d460ab5a /test/test_execfile.py
parente3c0b4b2c7d2a92344d30a25467a1e863bbb7d31 (diff)
downloadpython-coveragepy-git-ff9099051e0daff7b08035713eeca5696ab3217a.tar.gz
The best way to get py3k support: same source runs on both, with some contortions.
Diffstat (limited to 'test/test_execfile.py')
-rw-r--r--test/test_execfile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/test_execfile.py b/test/test_execfile.py
index aee4eeb3..d4fe2245 100644
--- a/test/test_execfile.py
+++ b/test/test_execfile.py
@@ -1,8 +1,10 @@
"""Tests for coverage.execfile"""
-import os
+import os, sys
from coverage.execfile import run_python_file
+
+sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k
from coveragetest import CoverageTest
here = os.path.dirname(__file__)