From aaa99829327ed92e19875704ca83021019acf651 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 11 Dec 2019 19:31:45 -0300 Subject: [PATCH] missing test file --- .../tests/client_tests/unit/test_stream_controller.py | 11 +++++++++++ 1 file changed, 11 insertions(+) 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