Anonymous committed efcd435

Temporary patch to make test_io wrap as it does
We are currently using as a substitute for a real _io module. This patch fixes errors that stem from the way gets called in that context. It should be reversed when there is an _io module in Java.

Comments (0)

Files changed (1)


     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, 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():