Skip to content

Commit 8246e84

Browse files
committed
Add test for theme switching
1 parent d7100d7 commit 8246e84

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_tui.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ async def test_browse_plot() -> None:
1818
assert pilot.app.query_one("#main-view").current == "plot"
1919

2020

21+
async def test_theme_switch() -> None:
22+
async with Browser(
23+
skhep_testdata.data_path("uproot-Event.root")
24+
).run_test() as pilot:
25+
await pilot.press("down", "down", "down", "enter")
26+
browser_theme = pilot.app.theme
27+
plot_theme = pilot.app.theme
28+
await pilot.press("t")
29+
new_browser_theme = pilot.app.theme
30+
new_plot_theme = pilot.app.theme
31+
assert browser_theme != new_browser_theme
32+
assert plot_theme != new_plot_theme
33+
34+
2135
async def test_browse_empty() -> None:
2236
async with Browser(
2337
skhep_testdata.data_path("uproot-empty.root")

0 commit comments

Comments
 (0)