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

Function test_from_markup

tests/test_text.py:95–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93
94
95def test_from_markup():
96 text = Text.from_markup("Hello, [bold]World![/bold]")
97 assert str(text) == "Hello, World!"
98 assert text._spans == [Span(7, 13, "bold")]
99
100
101def test_from_ansi():

Callers

nothing calls this directly

Calls 2

SpanClass · 0.90
from_markupMethod · 0.80

Tested by

no test coverage detected