[Jython-checkins] jython: Reapply Jython adjustments.
frank.wierzbicki
jython-checkins at python.org
Mon Oct 10 03:36:29 CEST 2011
http://hg.python.org/jython/rev/f118d899e052
changeset: 6252:f118d899e052
user: Frank Wierzbicki <fwierzbicki at gmail.com>
date: Sun Oct 09 18:35:57 2011 -0700
summary:
Reapply Jython adjustments.
files:
Lib/test/test_urllib.py | 5 +++--
Lib/urllib.py | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -66,8 +66,9 @@
def test_fileno(self):
file_num = self.returned_obj.fileno()
- self.assert_(isinstance(file_num, int),
- "fileno() did not return an int")
+ if not test_support.is_jython:
+ self.assert_(isinstance(file_num, int),
+ "fileno() did not return an int")
self.assertEqual(os.read(file_num, len(self.text)), self.text,
"Reading on the file descriptor returned by fileno() "
"did not return the expected text")
diff --git a/Lib/urllib.py b/Lib/urllib.py
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -44,7 +44,7 @@
# Helper for non-unix systems
if os.name == 'mac':
from macurl2path import url2pathname, pathname2url
-elif os.name == 'nt':
+elif (os._name if sys.platform.startswith('java') else os.name) == 'nt':
from nturl2path import url2pathname, pathname2url
elif os.name == 'riscos':
from rourl2path import url2pathname, pathname2url
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list