(self)
| 492 | encoding="utf-8", closefd=False) |
| 493 | |
| 494 | def test_closefd_attr(self): |
| 495 | with self.open(os_helper.TESTFN, "wb") as f: |
| 496 | f.write(b"egg\n") |
| 497 | with self.open(os_helper.TESTFN, "r", encoding="utf-8") as f: |
| 498 | self.assertEqual(f.buffer.raw.closefd, True) |
| 499 | file = self.open(f.fileno(), "r", encoding="utf-8", closefd=False) |
| 500 | self.assertEqual(file.buffer.raw.closefd, False) |
| 501 | |
| 502 | def test_garbage_collection(self): |
| 503 | # FileIO objects are collected, and collecting them flushes |
nothing calls this directly
no test coverage detected