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

Function test_strip_private_escape_sequences

tests/test_ansi.py:76–86  ·  view source on GitHub ↗
(code)

Source from the content-addressed store, hash-verified

74
75@pytest.mark.parametrize("code", [*"0123456789:;<=>?"])
76def test_strip_private_escape_sequences(code):
77 text = Text.from_ansi(f"\x1b{code}x")
78
79 console = Console(force_terminal=True)
80
81 with console.capture() as capture:
82 console.print(text)
83
84 expected = "x\n"
85
86 assert capture.get() == expected
87
88
89def test_decode_newlines():

Callers

nothing calls this directly

Calls 5

captureMethod · 0.95
printMethod · 0.95
ConsoleClass · 0.90
from_ansiMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected