summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_platform.py
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2006-04-04 15:52:00 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2006-04-04 15:52:00 (GMT)
commit06853fc15055686ec02fd2671fd37cda0f69209b (patch)
treef5a2cbe80618d7b3e0333ba7fa11319341ee464f /Lib/test/test_platform.py
parentb2fc21e9f8b58dd079ea0e6ebfc49ecda6114aea (diff)
downloadcpython-06853fc15055686ec02fd2671fd37cda0f69209b.zip
cpython-06853fc15055686ec02fd2671fd37cda0f69209b.tar.gz
cpython-06853fc15055686ec02fd2671fd37cda0f69209b.tar.bz2
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.
Diffstat (limited to 'Lib/test/test_platform.py')
-rw-r--r--Lib/test/test_platform.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index 200fba5..22307cd 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -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(