Test simple parsing of content markup.
()
| 153 | |
| 154 | |
| 155 | def test_from_markup(): |
| 156 | """Test simple parsing of content markup.""" |
| 157 | content = Content.from_markup("[red]Hello[/red] [blue]World[/blue]") |
| 158 | assert len(content) == 11 |
| 159 | assert content.plain == "Hello World" |
| 160 | assert content.spans == [ |
| 161 | Span(start=0, end=5, style="red"), |
| 162 | Span(start=6, end=11, style="blue"), |
| 163 | ] |
| 164 | |
| 165 | |
| 166 | def test_markup(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…