[Jython-checkins] jython: Temporary patch to make test_io wrap _io.open() as it does pyio.open()
jeff.allen
jython-checkins at python.org
Sat Sep 15 11:04:58 CEST 2012
http://hg.python.org/jython/rev/efcd4353d298
changeset: 6867:efcd4353d298
user: Jeff Allen <ja...py at farowl.co.uk>
date: Sat Sep 15 06:31:55 2012 +0100
summary:
Temporary patch to make test_io wrap _io.open() as it does pyio.open()
We are currently using _io.py as a substitute for a real _io module. This patch fixes errors that stem from the way _io.open() gets called in that context. It should be reversed when there is an _io module in Java.
files:
Lib/test/test_io.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -2949,6 +2949,9 @@
py_io_ns.update((x.__name__, globs["Py" + x.__name__]) for x in mocks)
# Avoid turning open into a bound method.
py_io_ns["open"] = pyio.OpenWrapper
+ # XXX: While we use _io.py, the same trick is necessary for it too
+ import _io # XXX
+ c_io_ns["open"] = _io.OpenWrapper # XXX
for test in tests:
if test.__name__.startswith("C"):
for name, obj in c_io_ns.items():
--
Repository URL: http://hg.python.org/jython
More information about the Jython-checkins
mailing list