diff --git a/torba/tests/client_tests/unit/test_stream_controller.py b/torba/tests/client_tests/unit/test_stream_controller.py index e54ef8c74..9a875f66e 100644 --- a/torba/tests/client_tests/unit/test_stream_controller.py +++ b/torba/tests/client_tests/unit/test_stream_controller.py @@ -1,4 +1,7 @@ +import asyncio + from torba.stream import StreamController +from torba.tasks import TaskGroup from torba.testcase import AsyncioTestCase @@ -18,3 +21,11 @@ class StreamControllerTestCase(AsyncioTestCase): controller.add("yo") controller.add("yo") self.assertListEqual(events, ["yo"]) + + +class TaskGroupTestCase(AsyncioTestCase): + async def test_stop_empty_set(self): + group = TaskGroup() + group.cancel() + await asyncio.wait_for(group.done.wait(), timeout=0.5) + self.assertTrue(group.done.is_set()) \ No newline at end of file