diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-10-09 20:19:23 (GMT) |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-10-09 20:19:23 (GMT) |
commit | be51a08b429e540ec266f9e7ef693ebea0971828 (patch) | |
tree | b8d678816029bead4134f300e781432b77a44ab8 /Lib/test | |
parent | fc2f64135861c7645ea21e3499e4d723bcd5d498 (diff) | |
parent | 86b0fb23e5efa3e4bdc351d839fec353d82bb588 (diff) | |
download | cpython-be51a08b429e540ec266f9e7ef693ebea0971828.zip cpython-be51a08b429e540ec266f9e7ef693ebea0971828.tar.gz cpython-be51a08b429e540ec266f9e7ef693ebea0971828.tar.bz2 |
Issue #16170: Merge subprocess test unskip from 3.3.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_subprocess.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 07e2b4b..8f5a58c 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -200,13 +200,16 @@ class ProcessTestCase(BaseTestCase): p.wait() self.assertEqual(47, p.returncode) - # TODO: make this test work on Linux. - # This may be failing on Linux because of issue #7774. - @unittest.skipIf(sys.platform not in ('win32', 'darwin'), - "possible bug using executable argument on Linux") def test_executable(self): # Check that the executable argument works. - self._assert_python(["doesnotexist", "-c"], executable=sys.executable) + # + # On Unix (non-Mac and non-Windows), Python looks at args[0] to + # determine where its standard library is, so we need the directory + # of args[0] to be valid for the Popen() call to Python to succeed. + # See also issue #16170 and issue #7774. + doesnotexist = os.path.join(os.path.dirname(sys.executable), + "doesnotexist") + self._assert_python([doesnotexist, "-c"], executable=sys.executable) def test_executable_takes_precedence(self): # Check that the executable argument takes precedence over args[0]. |