(self)
| 1545 | buf._write_stack) |
| 1546 | |
| 1547 | def test_issue142594(self): |
| 1548 | wrapper = None |
| 1549 | detached = False |
| 1550 | class ReentrantRawIO(self.RawIOBase): |
| 1551 | @property |
| 1552 | def closed(self): |
| 1553 | nonlocal detached |
| 1554 | if wrapper is not None and not detached: |
| 1555 | detached = True |
| 1556 | wrapper.detach() |
| 1557 | return False |
| 1558 | |
| 1559 | raw = ReentrantRawIO() |
| 1560 | wrapper = self.TextIOWrapper(raw) |
| 1561 | wrapper.close() # should not crash |
| 1562 | |
| 1563 | |
| 1564 | class PyTextIOWrapperTest(TextIOWrapperTest, PyTestCase): |
nothing calls this directly
no test coverage detected