Skip to content

Commit 217057c

Browse files
committed
simplify test
1 parent 67d9044 commit 217057c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_await_remove.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44

55
class SelfRemovingLabel(Label):
6-
def on_mount(self) -> None:
7-
self.set_timer(0.2, self.remove)
6+
async def on_mount(self) -> None:
7+
await self.remove()
88

99

1010
class RemoveOnTimerApp(App[None]):
@@ -17,6 +17,5 @@ async def test_multiple_simultaneous_removals():
1717
"""Regression test for https://github.com/Textualize/textual/issues/2854."""
1818
# The app should run and finish without raising any errors.
1919
async with RemoveOnTimerApp().run_test() as pilot:
20-
await pilot.pause(0.3)
2120
# Sanity check to ensure labels were removed.
2221
assert len(pilot.app.query(Label)) == 0

0 commit comments

Comments
 (0)