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

Function test_tabs_to_spaces_spans

tests/test_text.py:827–835  ·  view source on GitHub ↗

Test spans are correct after expand_tabs

(
    markup: str, tab_size: int, expected_text: str, expected_spans: List[Span]
)

Source from the content-addressed store, hash-verified

825 ],
826)
827def test_tabs_to_spaces_spans(
828 markup: str, tab_size: int, expected_text: str, expected_spans: List[Span]
829):
830 """Test spans are correct after expand_tabs"""
831 text = Text.from_markup(markup)
832 text.expand_tabs(tab_size)
833 print(text._spans)
834 assert text.plain == expected_text
835 assert text._spans == expected_spans
836
837
838def test_markup_switch():

Callers

nothing calls this directly

Calls 3

from_markupMethod · 0.80
expand_tabsMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected