File: test_shutdown.py

package info (click to toggle)
textual 2.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 55,084 kB
  • sloc: python: 85,423; lisp: 1,669; makefile: 101
file content (18 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from textual.app import App
from textual.containers import Horizontal
from textual.widgets import Footer, Tree


class TreeApp(App[None]):
    def compose(self):
        yield Horizontal(Tree("Dune"))
        yield Footer()


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()
    print("Check for deadlock in test_shutdown.py")
    async with app.run_test():
        pass