Commit d3a33dba authored by Anthony Baxter's avatar Anthony Baxter

Fix test_platform on cygwin. When running from build area, sys.executable

is 'python'. But 'python' is actually a directory, 'python.exe' is the
executable.
parent 74e16035
......@@ -63,7 +63,12 @@ class PlatformTest(unittest.TestCase):
res = platform.dist()
def test_libc_ver(self):
res = platform.libc_ver()
from sys import executable
import os
if os.path.isdir(executable) and os.path.exists(executable+'.exe'):
# Cygwin horror
executable = executable + '.exe'
res = platform.libc_ver(executable)
def test_main():
test_support.run_unittest(
......
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