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

Function test_rich

tests/test_color.py:28–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27
28def test_rich() -> None:
29 color = Color.parse("red")
30 as_text = color.__rich__()
31 print(repr(as_text))
32 print(repr(as_text.spans))
33 assert as_text == Text(
34 "<color 'red' (standard)⬤ >", spans=[Span(23, 24, Style(color=color))]
35 )
36
37
38def test_system() -> None:

Callers

nothing calls this directly

Calls 6

TextClass · 0.90
SpanClass · 0.90
StyleClass · 0.90
printFunction · 0.50
parseMethod · 0.45
__rich__Method · 0.45

Tested by

no test coverage detected