TaskGroup cannot work without even loop
This commit is contained in:
parent
a258b96602
commit
c1e2c415c4
1 changed files with 3 additions and 5 deletions
|
@ -1,6 +1,3 @@
|
|||
import asyncio
|
||||
import unittest
|
||||
|
||||
from torba.stream import StreamController
|
||||
from torba.tasks import TaskGroup
|
||||
from torba.testcase import AsyncioTestCase
|
||||
|
@ -24,8 +21,9 @@ class StreamControllerTestCase(AsyncioTestCase):
|
|||
self.assertListEqual(events, ["yo"])
|
||||
|
||||
|
||||
class TaskGroupTestCase(unittest.TestCase):
|
||||
def test_cancel_sets_it_done(self):
|
||||
class TaskGroupTestCase(AsyncioTestCase):
|
||||
|
||||
async def test_cancel_sets_it_done(self):
|
||||
group = TaskGroup()
|
||||
group.cancel()
|
||||
self.assertTrue(group.done.is_set())
|
||||
|
|
Loading…
Reference in a new issue