Commits

Anonymous committed efcd435

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.

Comments (0)

Files changed (1)

Lib/test/test_io.py

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