1. Armin Rigo
  2. cpython-withatomic

Commits

Anthony Baxter  committed f8fc30c

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.

  • Participants
  • Parent commits 8efdef2
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/test/test_platform.py

View file
  • Ignore whitespace
         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(