MCPcopy
hub / github.com/Textualize/textual / test_timeout

Function test_timeout

tests/notifications/test_notifications.py:21–28  ·  view source on GitHub ↗

Notifications should timeout from the list.

()

Source from the content-addressed store, hash-verified

19
20
21def test_timeout() -> None:
22 """Notifications should timeout from the list."""
23 tester = Notifications()
24 for n in range(100):
25 tester.add(Notification("test", timeout=(0.5 if bool(n % 2) else 60)))
26 assert len(tester) == 100
27 sleep(0.6)
28 assert len(tester) == 50
29
30
31def test_in() -> None:

Callers

nothing calls this directly

Calls 4

addMethod · 0.95
NotificationsClass · 0.90
NotificationClass · 0.90
sleepFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…