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

Function test_screen

tests/test_console.py:723–733  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

721
722@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows")
723def test_screen() -> None:
724 console = Console(
725 color_system=None, force_terminal=True, force_interactive=True, _environ={}
726 )
727 with console.capture() as capture:
728 with console.screen():
729 console.print("Don't panic")
730 expected = "\x1b[?1049h\x1b[H\x1b[?25lDon't panic\n\x1b[?1049l\x1b[?25h"
731 result = capture.get()
732 print(repr(result))
733 assert result == expected
734
735
736@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows")

Callers

nothing calls this directly

Calls 6

captureMethod · 0.95
screenMethod · 0.95
printMethod · 0.95
ConsoleClass · 0.90
printFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected