| 597 | # Make sure a `.readinto` call which returns a value outside |
| 598 | # (0, len(buffer)) raises. |
| 599 | class Misbehaved(self.io.RawIOBase): |
| 600 | def __init__(self, readinto_return) -> None: |
| 601 | self._readinto_return = readinto_return |
| 602 | def readinto(self, b): |
| 603 | return self._readinto_return |
| 604 | |
| 605 | with self.assertRaises(ValueError) as cm: |
| 606 | Misbehaved(2).read(1) |
no outgoing calls
searching dependent graphs…