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

Function test_apply_meta

tests/test_text.py:1013–1021  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1011
1012
1013def test_apply_meta():
1014 text = Text("foobar")
1015 text.apply_meta({"foo": "bar"}, 1, 3)
1016
1017 console = Console()
1018 assert text.get_style_at_offset(console, 0).meta == {}
1019 assert text.get_style_at_offset(console, 1).meta == {"foo": "bar"}
1020 assert text.get_style_at_offset(console, 2).meta == {"foo": "bar"}
1021 assert text.get_style_at_offset(console, 3).meta == {}
1022
1023
1024def test_on():

Callers

nothing calls this directly

Calls 4

apply_metaMethod · 0.95
get_style_at_offsetMethod · 0.95
TextClass · 0.90
ConsoleClass · 0.90

Tested by

no test coverage detected