Commits

Anonymous committed e6c8d0e

Error during io.*.close() should result in not closed
test_io now down to 87 skips.

  • Participants
  • Parent commits eaa8ba0

Comments (0)

Files changed (2)

     def raw(self):
         return self._raw
 
-    # Jython difference: @property closed(self) inherited from _IOBase.__closed
+    @property
+    def closed(self):
+        return self.raw.closed
 
     # Jython difference: emulate C implementation CHECK_INITIALIZED. This is for
     # compatibility, to pass test.test_io.CTextIOWrapperTest.test_initialization.
             finally:
                 self.buffer.close()
 
-    # Jython difference: @property closed(self) inherited from _IOBase.__closed
+    @property
+    def closed(self):
+        return self.buffer.closed
 
     # Jython difference: emulate C implementation CHECK_INITIALIZED. This is for
     # compatibility, to pass test.test_io.CTextIOWrapperTest.test_initialization.

Lib/test/test_io.py

         self.assertRaises(IOError, b.close) # exception not swallowed
         self.assertTrue(b.closed)
 
-    @unittest.skipIf(support.is_jython, "FIXME: by redefinition of closed")
     def test_close_error_on_close(self):
         raw = self.MockRawIO()
         def bad_flush():