[Jython-checkins] jython (merge 2.5 -> default): Disabling a test dependent on sys.executable, which is None on jython

alan.kennedy jython-checkins at python.org
Sat Feb 16 14:31:07 CET 2013


http://hg.python.org/jython/rev/d1cdccf5daa8
changeset:   7055:d1cdccf5daa8
parent:      7054:0457c1a9b23c
parent:      7053:ce225289358a
user:        Alan Kennedy <alan at xhaus.com>
date:        Sat Feb 16 13:29:22 2013 +0000
summary:
  Disabling a test dependent on sys.executable, which is None on jython

files:
  Lib/platform.py           |  3 ++-
  Lib/test/test_platform.py |  2 ++
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/platform.py b/Lib/platform.py
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -1003,7 +1003,8 @@
 
     """ Interface to the system's uname command.
     """
-    if sys.platform in ('dos','win32','win16','os2'):
+    if sys.platform in ('dos','win32','win16','os2') or \
+       (sys.platform.startswith('java') and os._name == 'nt'):
         # XXX Others too ?
         return default
     try:
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -224,6 +224,8 @@
         res = platform.dist()
 
     def test_libc_ver(self):
+        if sys.executable is None:
+            return
         import os
         if os.path.isdir(sys.executable) and \
            os.path.exists(sys.executable+'.exe'):

-- 
Repository URL: http://hg.python.org/jython


More information about the Jython-checkins mailing list