We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 67d9044 + 217057c commit 461ad80Copy full SHA for 461ad80
tests/test_await_remove.py
@@ -3,8 +3,8 @@
3
4
5
class SelfRemovingLabel(Label):
6
- def on_mount(self) -> None:
7
- self.set_timer(0.2, self.remove)
+ async def on_mount(self) -> None:
+ await self.remove()
8
9
10
class RemoveOnTimerApp(App[None]):
@@ -17,6 +17,5 @@ async def test_multiple_simultaneous_removals():
17
"""Regression test for https://github.com/Textualize/textual/issues/2854."""
18
# The app should run and finish without raising any errors.
19
async with RemoveOnTimerApp().run_test() as pilot:
20
- await pilot.pause(0.3)
21
# Sanity check to ensure labels were removed.
22
assert len(pilot.app.query(Label)) == 0
0 commit comments