diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-03-29 19:30:55 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-03-29 19:30:55 (GMT) |
commit | 5550365f4b14520297e47043f16f0ecff9081101 (patch) | |
tree | 440a978ffda6fd6abeccdce15ba83f4d27e7970f /Lib/test/test_subprocess.py | |
parent | 0dd737b5ab1624c061a10d569138963b57f32f96 (diff) | |
download | cpython-5550365f4b14520297e47043f16f0ecff9081101.zip cpython-5550365f4b14520297e47043f16f0ecff9081101.tar.gz cpython-5550365f4b14520297e47043f16f0ecff9081101.tar.bz2 |
Fix test_subprocess so that it works when launched from another directory than
the source dist.
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r-- | Lib/test/test_subprocess.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 2070495..66aebfc 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -142,8 +142,9 @@ class ProcessTestCase(unittest.TestCase): self.assertEqual(p.stderr, None) def test_executable(self): - p = subprocess.Popen(["somethingyoudonthave", - "-c", "import sys; sys.exit(47)"], + arg0 = os.path.join(os.path.dirname(sys.executable), + "somethingyoudonthave") + p = subprocess.Popen([arg0, "-c", "import sys; sys.exit(47)"], executable=sys.executable) p.wait() self.assertEqual(p.returncode, 47) |