``BytesIOCopy`` writes to itself and to ``copy_to``.
()
| 163 | |
| 164 | |
| 165 | def test_bytesiocopy_writes_to_both(): |
| 166 | """``BytesIOCopy`` writes to itself and to ``copy_to``.""" |
| 167 | target = io.BytesIO() |
| 168 | copier = BytesIOCopy(copy_to=target) |
| 169 | copier.write(b"data") |
| 170 | copier.flush() |
| 171 | assert copier.getvalue() == b"data" |
| 172 | assert target.getvalue() == b"data" |
| 173 | |
| 174 | |
| 175 | def test_bytesiocopy_flush_propagates(): |
nothing calls this directly
no test coverage detected