From: <pj...@us...> - 2009-05-28 04:03:36
|
Revision: 6411 http://jython.svn.sourceforge.net/jython/?rev=6411&view=rev Author: pjenvey Date: 2009-05-28 04:03:31 +0000 (Thu, 28 May 2009) Log Message: ----------- o enable with statement for netrc to fix test_netrc on Windows o add jython windows check to test_urllib2 Modified Paths: -------------- trunk/jython/Lib/netrc.py trunk/jython/Lib/test/test_urllib2.py Modified: trunk/jython/Lib/netrc.py =================================================================== --- trunk/jython/Lib/netrc.py 2009-05-28 04:02:18 UTC (rev 6410) +++ trunk/jython/Lib/netrc.py 2009-05-28 04:03:31 UTC (rev 6411) @@ -2,6 +2,7 @@ # Module and documentation by Eric S. Raymond, 21 Dec 1998 +from __future__ import with_statement import os, shlex __all__ = ["netrc", "NetrcParseError"] Modified: trunk/jython/Lib/test/test_urllib2.py =================================================================== --- trunk/jython/Lib/test/test_urllib2.py 2009-05-28 04:02:18 UTC (rev 6410) +++ trunk/jython/Lib/test/test_urllib2.py 2009-05-28 04:03:31 UTC (rev 6411) @@ -535,7 +535,8 @@ def sanepathname2url(path): import urllib urlpath = urllib.pathname2url(path) - if os.name == "nt" and urlpath.startswith("///"): + if ((os._name if test_support.is_jython else os.name) == 'nt' + and urlpath.startswith("///")): urlpath = urlpath[2:] # XXX don't ask me about the mac... return urlpath This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |