summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-10-05 14:36:44 -0400
committerNed Batchelder <ned@nedbatchelder.com>2013-10-05 14:36:44 -0400
commit9bb2dc364c54ee72d02993f534532fce524bcdef (patch)
tree590d53929a3ba5155e23baf9d133b8cd1b239eb7 /tests/test_process.py
parent7599c0d495353607155f336c8c7a9850f8ad4f55 (diff)
downloadpython-coveragepy-git-9bb2dc364c54ee72d02993f534532fce524bcdef.tar.gz
Can't just run 'python' in a subprocess from 3.x, since it doesn't install as 'python'.
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index 4409c69e..c49d90a9 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -598,10 +598,12 @@ class ProcessStartupTest(CoverageTest):
raise SkipTest(
"Can't test subprocess pth file suppport during metacoverage"
)
+
# Main will run sub.py
self.make_file("main.py", """\
- import os
- os.system("python sub.py")
+ import os, os.path, sys
+ ex = os.path.basename(sys.executable)
+ os.system(ex + " sub.py")
""")
# sub.py will write a few lines.
self.make_file("sub.py", """\