MCPcopy
hub / github.com/Textualize/rich / test_flush

Function test_flush

tests/test_file_proxy.py:20–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19
20def 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
30def test_new_lines():

Callers

nothing calls this directly

Calls 4

writeMethod · 0.95
flushMethod · 0.95
ConsoleClass · 0.90
FileProxyClass · 0.90

Tested by

no test coverage detected