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

Function test_filename_not_a_file

tests/test_traceback.py:202–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200
201
202def test_filename_not_a_file():
203 console = Console(width=100, file=io.StringIO())
204 try:
205 exec(compile("1/0", filename="string", mode="exec"))
206 except Exception:
207 console.print_exception()
208 exception_text = console.file.getvalue()
209 assert "string" in exception_text
210
211
212@pytest.mark.skipif(sys.platform == "win32", reason="renders different on windows")

Callers

nothing calls this directly

Calls 2

print_exceptionMethod · 0.95
ConsoleClass · 0.90

Tested by

no test coverage detected