forked from LBRYCommunity/lbry-sdk
simplify test
This commit is contained in:
parent
82ef76b1cb
commit
a258b96602
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import unittest
|
||||||
|
|
||||||
from torba.stream import StreamController
|
from torba.stream import StreamController
|
||||||
from torba.tasks import TaskGroup
|
from torba.tasks import TaskGroup
|
||||||
|
@ -23,9 +24,8 @@ class StreamControllerTestCase(AsyncioTestCase):
|
||||||
self.assertListEqual(events, ["yo"])
|
self.assertListEqual(events, ["yo"])
|
||||||
|
|
||||||
|
|
||||||
class TaskGroupTestCase(AsyncioTestCase):
|
class TaskGroupTestCase(unittest.TestCase):
|
||||||
async def test_stop_empty_set(self):
|
def test_cancel_sets_it_done(self):
|
||||||
group = TaskGroup()
|
group = TaskGroup()
|
||||||
group.cancel()
|
group.cancel()
|
||||||
await asyncio.wait_for(group.done.wait(), timeout=0.5)
|
|
||||||
self.assertTrue(group.done.is_set())
|
self.assertTrue(group.done.is_set())
|
Loading…
Reference in a new issue