allow waiting of screen operations

This commit is contained in:
Will McGugan
2022-10-30 15:24:48 +00:00
parent cfd5d532dd
commit 170be7eb2a
5 changed files with 49 additions and 22 deletions

View File

@@ -29,11 +29,10 @@ async def test_unmount():
class UnmountApp(App):
async def on_mount(self) -> None:
self.push_screen(MyScreen(id="main"))
await self.push_screen(MyScreen(id="main"))
app = UnmountApp()
async with app.run_test() as pilot:
await pilot.pause() # TODO remove when push_screen is awaitable
await pilot.exit(None)
expected = [