[Python-checkins] cpython (merge 3.3 -> default): Issue #16170: Merge subprocess test unskip from 3.3.
chris.jerdonek
python-checkins at python.org
Tue Oct 9 22:21:23 CEST 2012
http://hg.python.org/cpython/rev/0ee03c9b098f
changeset: 79631:0ee03c9b098f
parent: 79629:5733529b297c
parent: 79630:9451908da615
user: Chris Jerdonek <chris.jerdonek at gmail.com>
date: Tue Oct 09 13:19:23 2012 -0700
summary:
Issue #16170: Merge subprocess test unskip from 3.3.
files:
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
--- a/Lib/test/test_subprocess.py
+++ b/Lib/test/test_subprocess.py
@@ -200,13 +200,16 @@
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].
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list