()
| 8 | |
| 9 | |
| 10 | def test_empty_bytes(): |
| 11 | console = Console() |
| 12 | file_proxy = FileProxy(console, sys.stdout) |
| 13 | # File should raise TypeError when writing bytes |
| 14 | with pytest.raises(TypeError): |
| 15 | file_proxy.write(b"") # type: ignore |
| 16 | with pytest.raises(TypeError): |
| 17 | file_proxy.write(b"foo") # type: ignore |
| 18 | |
| 19 | |
| 20 | def test_flush(): |