(self)
| 605 | rewind_body(body, body_pos) |
| 606 | |
| 607 | def test_rewind_body_bad_position(self) -> None: |
| 608 | body = io.BytesIO(b"test data") |
| 609 | body.read() # Consume body |
| 610 | |
| 611 | # Pass non-integer position |
| 612 | with pytest.raises(ValueError): |
| 613 | rewind_body(body, body_pos=None) # type: ignore[arg-type] |
| 614 | with pytest.raises(ValueError): |
| 615 | rewind_body(body, body_pos=object()) # type: ignore[arg-type] |
| 616 | |
| 617 | def test_rewind_body_failed_seek(self) -> None: |
| 618 | class BadSeek(io.StringIO): |
nothing calls this directly
no test coverage detected