()
| 1032 | |
| 1033 | |
| 1034 | def test_markup_property(): |
| 1035 | assert Text("").markup == "" |
| 1036 | assert Text("foo").markup == "foo" |
| 1037 | assert Text("foo", style="bold").markup == "[bold]foo[/bold]" |
| 1038 | assert Text.from_markup("foo [red]bar[/red]").markup == "foo [red]bar[/red]" |
| 1039 | assert ( |
| 1040 | Text.from_markup("foo [red]bar[/red]", style="bold").markup |
| 1041 | == "[bold]foo [red]bar[/red][/bold]" |
| 1042 | ) |
| 1043 | assert ( |
| 1044 | Text.from_markup("[bold]foo [italic]bar[/bold] baz[/italic]").markup |
| 1045 | == "[bold]foo [italic]bar[/bold] baz[/italic]" |
| 1046 | ) |
| 1047 | assert Text("[bold]foo").markup == "\\[bold]foo" |
| 1048 | |
| 1049 | |
| 1050 | def test_extend_style(): |
nothing calls this directly
no test coverage detected