MCPcopy Index your code
hub / github.com/Textualize/textual / run

Method run

tests/test_concurrency.py:27–34  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25 super().__init__()
26
27 def run(self) -> None:
28 def write_stuff(text: str) -> None:
29 """Write stuff to a widget."""
30 self.app.query_one(RichLog).write(text)
31
32 self.app.call_from_thread(write_stuff, "Hello")
33 # Exit the app with a code we can assert
34 self.app.call_from_thread(self.app.exit, 123)
35
36 class ThreadTestApp(App[object]):
37 """Trivial app with a single widget."""

Callers 15

test_auto_refreshFunction · 0.45
test_early_exit_inlineFunction · 0.45
test_app_loopFunction · 0.45
test_call_from_threadFunction · 0.45
deadlock.pyFile · 0.45
test_deadlockFunction · 0.45
auto_grid.pyFile · 0.45

Calls 1

call_from_threadMethod · 0.80

Tested by

no test coverage detected