Skip to content

Commit 159f94a

Browse files
committed
Reformat to keep black happy
1 parent adecdde commit 159f94a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_dark_toggle.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
from textual.app import App
22

3+
34
class OnLoadDarkSwitch(App[None]):
45
"""App for testing toggling dark mode in on_load."""
56

67
def on_load(self) -> None:
78
self.dark = not self.dark
89

10+
911
async def test_toggle_dark_on_load() -> None:
1012
"""It should be possible to toggle dark mode in on_load."""
1113
async with OnLoadDarkSwitch().run_test() as pilot:
1214
assert not pilot.app.dark
1315

16+
1417
class OnMountDarkSwitch(App[None]):
1518
"""App for testing toggling dark mode in on_mount."""
1619

1720
def on_mount(self) -> None:
1821
self.dark = not self.dark
1922

23+
2024
async def test_toggle_dark_on_mount() -> None:
2125
"""It should be possible to toggle dark mode in on_mount."""
2226
async with OnMountDarkSwitch().run_test() as pilot:
2327
assert not pilot.app.dark
2428

29+
2530
class ActionDarkSwitch(App[None]):
2631
"""App for testing toggling dark mode from an action."""
2732

@@ -30,6 +35,7 @@ class ActionDarkSwitch(App[None]):
3035
def action_toggle(self) -> None:
3136
self.dark = not self.dark
3237

38+
3339
async def test_toggle_dark_in_action() -> None:
3440
"""It should be possible to toggle dark mode with an action."""
3541
async with OnMountDarkSwitch().run_test() as pilot:

0 commit comments

Comments
 (0)