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

Function test_from_markup

tests/test_content.py:155–163  ·  view source on GitHub ↗

Test simple parsing of content markup.

()

Source from the content-addressed store, hash-verified

153
154
155def test_from_markup():
156 """Test simple parsing of content markup."""
157 content = Content.from_markup("[red]Hello[/red] [blue]World[/blue]")
158 assert len(content) == 11
159 assert content.plain == "Hello World"
160 assert content.spans == [
161 Span(start=0, end=5, style="red"),
162 Span(start=6, end=11, style="blue"),
163 ]
164
165
166def test_markup():

Callers

nothing calls this directly

Calls 2

SpanClass · 0.90
from_markupMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…