()
| 18 | |
| 19 | |
| 20 | def test_flush(): |
| 21 | file = io.StringIO() |
| 22 | console = Console(file=file) |
| 23 | file_proxy = FileProxy(console, file) |
| 24 | file_proxy.write("foo") |
| 25 | assert file.getvalue() == "" |
| 26 | file_proxy.flush() |
| 27 | assert file.getvalue() == "foo\n" |
| 28 | |
| 29 | |
| 30 | def test_new_lines(): |