forked from LBRYCommunity/lbry-sdk
silence expected exception
This commit is contained in:
parent
ae8bc59c65
commit
096f74d79b
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ class StreamControllerTestCase(AsyncioTestCase):
|
||||||
raise ValueError('bad')
|
raise ValueError('bad')
|
||||||
controller = EventController()
|
controller = EventController()
|
||||||
controller.stream.listen(bad_listener)
|
controller.stream.listen(bad_listener)
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError), self.assertLogs():
|
||||||
await controller.add("yo")
|
await controller.add("yo")
|
||||||
|
|
||||||
async def test_async_listener_errors(self):
|
async def test_async_listener_errors(self):
|
||||||
|
@ -39,7 +39,7 @@ class StreamControllerTestCase(AsyncioTestCase):
|
||||||
raise ValueError('bad')
|
raise ValueError('bad')
|
||||||
controller = EventController()
|
controller = EventController()
|
||||||
controller.stream.listen(bad_listener)
|
controller.stream.listen(bad_listener)
|
||||||
with self.assertRaises(ValueError):
|
with self.assertRaises(ValueError), self.assertLogs():
|
||||||
await controller.add("yo")
|
await controller.add("yo")
|
||||||
|
|
||||||
async def test_first_event(self):
|
async def test_first_event(self):
|
||||||
|
|
Loading…
Reference in a new issue