[Python-checkins] r43636 - python/trunk/Lib/test/test_platform.py

anthony.baxter python-checkins at python.org
Tue Apr 4 17:52:01 CEST 2006


Author: anthony.baxter
Date: Tue Apr  4 17:52:00 2006
New Revision: 43636

Modified:
   python/trunk/Lib/test/test_platform.py
Log:
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. 


Modified: python/trunk/Lib/test/test_platform.py
==============================================================================
--- python/trunk/Lib/test/test_platform.py	(original)
+++ python/trunk/Lib/test/test_platform.py	Tue Apr  4 17:52:00 2006
@@ -63,7 +63,12 @@
         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(


More information about the Python-checkins mailing list