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

Function test_empty_bytes

tests/test_file_proxy.py:10–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def 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
20def test_flush():

Callers

nothing calls this directly

Calls 3

writeMethod · 0.95
ConsoleClass · 0.90
FileProxyClass · 0.90

Tested by

no test coverage detected