[Jython-checkins] jython: test_java_integration proxy test fixes for Windows.
jeff.allen
jython-checkins at python.org
Sun Sep 8 23:25:54 CEST 2013
http://hg.python.org/jython/rev/7629a805d9f4
changeset: 7123:7629a805d9f4
user: Jeff Allen <ja.py at farowl.co.uk>
date: Sun Sep 08 22:14:21 2013 +0100
summary:
test_java_integration proxy test fixes for Windows.
Used os.pathsep and universal_newlines for cross-platform success.
files:
Lib/test/test_java_integration.py | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/Lib/test/test_java_integration.py b/Lib/test/test_java_integration.py
--- a/Lib/test/test_java_integration.py
+++ b/Lib/test/test_java_integration.py
@@ -652,12 +652,13 @@
# Jython runtime) is initialized for the proxy
jars = find_jython_jars()
jars.append(proxies_jar_path)
- classpath = ":".join(jars)
+ classpath = os.pathsep.join(jars)
env = dict(os.environ)
env.update(JYTHONPATH=os.path.normpath(os.path.join(__file__, "..")))
cmd = [os.path.join(System.getProperty("java.home"), "bin/java"),
"-classpath", classpath, "ProxyDeserialization", cat_path]
- self.assertEqual(subprocess.check_output(cmd, env=env), "meow\n")
+ self.assertEqual(subprocess.check_output(cmd, env=env, universal_newlines=True),
+ "meow\n")
finally:
org.python.core.Options.proxyDebugDirectory = old_proxy_debug_dir
shutil.rmtree(tempdir)
@@ -695,7 +696,7 @@
"""
jars = find_jython_jars()
jars.append(proxies_jar_path)
- classpath = ":".join(jars)
+ classpath = os.pathsep.join(jars)
compile_java_source(
["-classpath", classpath, "-d", tempdir],
"BarkTheDog", source)
@@ -705,15 +706,15 @@
# message printed to stdout, which in turn ensures that
# PySystemState (and Jython runtime) is initialized for
# the proxy
- classpath += ":" + tempdir
+ classpath += os.pathsep + tempdir
cmd = [os.path.join(System.getProperty("java.home"), "bin/java"),
"-classpath", classpath, "BarkTheDog"]
env = dict(os.environ)
env.update(JYTHONPATH=os.path.normpath(os.path.join(__file__, "..")))
self.assertEqual(
- subprocess.check_output(cmd, env=env),
- "Class defined on CLASSPATH <type 'org.python.test.bark.Dog'>\n"
- "Rover barks 42 times\n")
+ subprocess.check_output(cmd, env=env, universal_newlines=True),
+ "Class defined on CLASSPATH <type 'org.python.test.bark.Dog'>\n"
+ "Rover barks 42 times\n")
finally:
pass
# print "Will not remove", tempdir
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list