Commit 5550365f authored by Antoine Pitrou's avatar Antoine Pitrou

Fix test_subprocess so that it works when launched from another directory than

the source dist.
parent 0dd737b5
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment