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

Function test_rich_console

tests/test_live_render.py:31–45  ·  view source on GitHub ↗
(live_render)

Source from the content-addressed store, hash-verified

29
30
31def test_rich_console(live_render):
32 options = ConsoleOptions(
33 ConsoleDimensions(80, 25),
34 max_height=25,
35 legacy_windows=False,
36 min_width=10,
37 max_width=20,
38 is_terminal=False,
39 encoding="utf-8",
40 )
41 rich_console = live_render.__rich_console__(Console(), options)
42 assert [Segment("my string", None)] == list(rich_console)
43 live_render.style = "red"
44 rich_console = live_render.__rich_console__(Console(), options)
45 assert [Segment("my string", Style.parse("red"))] == list(rich_console)

Callers

nothing calls this directly

Calls 6

ConsoleOptionsClass · 0.90
ConsoleDimensionsClass · 0.90
ConsoleClass · 0.90
SegmentClass · 0.90
__rich_console__Method · 0.45
parseMethod · 0.45

Tested by

no test coverage detected