summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-03-11 13:27:35 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-03-11 13:27:35 (GMT)
commit6ecd85f40157dee45b1e1d55e517d83d695f0e9c (patch)
tree51bb36512efa7b13f8ebc178840c6441c00d6adc
parent4a7e0c858c624eee49b9b1a977c887f5b49d0fd4 (diff)
downloadcpython-6ecd85f40157dee45b1e1d55e517d83d695f0e9c.zip
cpython-6ecd85f40157dee45b1e1d55e517d83d695f0e9c.tar.gz
cpython-6ecd85f40157dee45b1e1d55e517d83d695f0e9c.tar.bz2
Fix test_executable introduce in previous commit (r78835): Windows is able to
retrieve the absolute Python path even if argv[0] has been set to a non existent program name.
-rw-r--r--Lib/test/test_sys.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index e41814b..75eba87 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -443,11 +443,11 @@ class SysModuleTest(unittest.TestCase):
# retrieve the real program name
import subprocess
p = subprocess.Popen(
- ["nonexistent", "-c", 'import sys; print "executable=%r" % sys.executable'],
+ ["nonexistent", "-c", 'import sys; print repr(sys.executable)'],
executable=sys.executable, stdout=subprocess.PIPE)
executable = p.communicate()[0].strip()
p.wait()
- self.assertEqual(executable, "executable=''")
+ self.assertIn(executable, ["''", repr(sys.executable)])
class SizeofTest(unittest.TestCase):