Test simple application of highlight.
()
| 5 | |
| 6 | |
| 7 | def test_highlight() -> None: |
| 8 | """Test simple application of highlight.""" |
| 9 | import_this = highlight("import this", language="python") |
| 10 | assert import_this.plain == "import this" |
| 11 | print(import_this.spans) |
| 12 | assert import_this.spans == [ |
| 13 | Span(0, 11, style="$text"), |
| 14 | Span(0, 6, style="$text-error"), |
| 15 | Span(7, 11, style="$text-primary"), |
| 16 | ] |
| 17 | |
| 18 | |
| 19 | @pytest.mark.parametrize( |