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

Function test_get_style_at_offset

tests/test_text.py:892–896  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

890
891
892def test_get_style_at_offset():
893 console = Console()
894 text = Text.from_markup("Hello [b]World[/b]")
895 assert text.get_style_at_offset(console, 0) == Style()
896 assert text.get_style_at_offset(console, 6) == Style(bold=True)
897
898
899@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 4

ConsoleClass · 0.90
StyleClass · 0.90
from_markupMethod · 0.80
get_style_at_offsetMethod · 0.80

Tested by

no test coverage detected