()
| 201 | |
| 202 | |
| 203 | def test_highlight_json_no_indent(): |
| 204 | json_string = json.dumps({"name": "apple", "count": 1}, indent=None) |
| 205 | text = Text(json_string) |
| 206 | highlighter = JSONHighlighter() |
| 207 | highlighter.highlight(text) |
| 208 | assert text.spans == [ |
| 209 | Span(0, 1, "json.brace"), |
| 210 | Span(1, 7, "json.str"), |
| 211 | Span(9, 16, "json.str"), |
| 212 | Span(18, 25, "json.str"), |
| 213 | Span(27, 28, "json.number"), |
| 214 | Span(28, 29, "json.brace"), |
| 215 | Span(1, 7, "json.key"), |
| 216 | Span(18, 25, "json.key"), |
| 217 | ] |
| 218 | |
| 219 | |
| 220 | iso8601_highlight_tests = [ |
nothing calls this directly
no test coverage detected