From a258b966028cf7683e17e87840127898fa67faef Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 11 Dec 2019 23:33:34 -0300 Subject: [PATCH] simplify test --- torba/tests/client_tests/unit/test_stream_controller.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/torba/tests/client_tests/unit/test_stream_controller.py b/torba/tests/client_tests/unit/test_stream_controller.py index 9a875f66e..2d33f698a 100644 --- a/torba/tests/client_tests/unit/test_stream_controller.py +++ b/torba/tests/client_tests/unit/test_stream_controller.py @@ -1,4 +1,5 @@ import asyncio +import unittest from torba.stream import StreamController from torba.tasks import TaskGroup @@ -23,9 +24,8 @@ class StreamControllerTestCase(AsyncioTestCase): self.assertListEqual(events, ["yo"]) -class TaskGroupTestCase(AsyncioTestCase): - async def test_stop_empty_set(self): +class TaskGroupTestCase(unittest.TestCase): + def test_cancel_sets_it_done(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 + self.assertTrue(group.done.is_set())