mirror of https://github.com/python/cpython
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.
This commit is contained in:
parent
4a7e0c858c
commit
6ecd85f401
|
@ -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):
|
||||
|
||||
|
|
Loading…
Reference in New Issue