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

Function test_filename_with_bracket

tests/test_traceback.py:192–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190
191
192def test_filename_with_bracket():
193 console = Console(width=100, file=io.StringIO())
194 try:
195 exec(compile("1/0", filename="<string>", mode="exec"))
196 except Exception:
197 console.print_exception()
198 exception_text = console.file.getvalue()
199 assert "<string>" in exception_text
200
201
202def test_filename_not_a_file():

Callers

nothing calls this directly

Calls 2

print_exceptionMethod · 0.95
ConsoleClass · 0.90

Tested by

no test coverage detected