async test

This commit is contained in:
Will McGugan
2024-06-11 10:53:26 +01:00
parent 714a7b6629
commit d067c9cff2

View File

@@ -1,5 +1,3 @@
import asyncio
from textual.app import App
from textual.containers import Horizontal
from textual.widgets import Footer, Tree
@@ -11,13 +9,10 @@ class TreeApp(App[None]):
yield Footer()
def test_shutdown():
async def test_shutdown():
# regression test for https://github.com/Textualize/textual/issues/4634
# Testing that an app with the footer doesn't deadlock
app = TreeApp()
async def run_test():
async with app.run_test():
pass
asyncio.run(run_test())
print("Check for deadlock in test_shutdown.py")
async with app.run_test():
pass