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

Function test_highlight_json_string_only

tests/test_highlighter.py:187–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185
186
187def test_highlight_json_string_only():
188 json_string = '"abc"'
189 text = Text(json_string)
190 highlighter = JSONHighlighter()
191 highlighter.highlight(text)
192 assert text.spans == [Span(0, 5, "json.str")]
193
194
195def test_highlight_json_empty_string_only():

Callers

nothing calls this directly

Calls 4

highlightMethod · 0.95
TextClass · 0.90
JSONHighlighterClass · 0.90
SpanClass · 0.90

Tested by

no test coverage detected