summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_coroutines.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_coroutines.py')
-rw-r--r--Lib/test/test_coroutines.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index 8fff2d4..9a2279d 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -709,9 +709,16 @@ class CoroutineTest(unittest.TestCase):
aw = coro.__await__()
next(aw)
with self.assertRaises(ZeroDivisionError):
- aw.throw(ZeroDivisionError, None, None)
+ aw.throw(ZeroDivisionError())
self.assertEqual(N, 102)
+ coro = foo()
+ aw = coro.__await__()
+ next(aw)
+ with self.assertRaises(ZeroDivisionError):
+ with self.assertWarns(DeprecationWarning):
+ aw.throw(ZeroDivisionError, ZeroDivisionError(), None)
+
def test_func_11(self):
async def func(): pass
coro = func()