()
| 41 | |
| 42 | |
| 43 | def test_theme_stack(): |
| 44 | theme = Theme({class="st">"warning": class="st">"red"}) |
| 45 | stack = ThemeStack(theme) |
| 46 | assert stack.get(class="st">"warning") == Style.parse(class="st">"red") |
| 47 | new_theme = Theme({class="st">"warning": class="st">"bold yellow"}) |
| 48 | stack.push_theme(new_theme) |
| 49 | assert stack.get(class="st">"warning") == Style.parse(class="st">"bold yellow") |
| 50 | stack.pop_theme() |
| 51 | assert stack.get(class="st">"warning") == Style.parse(class="st">"red") |
| 52 | with pytest.raises(ThemeStackError): |
| 53 | stack.pop_theme() |
nothing calls this directly
no test coverage detected