summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_contextlib_async.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_contextlib_async.py')
-rw-r--r--Lib/test/test_contextlib_async.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_contextlib_async.py b/Lib/test/test_contextlib_async.py
index 57716ae..492b226 100644
--- a/Lib/test/test_contextlib_async.py
+++ b/Lib/test/test_contextlib_async.py
@@ -352,6 +352,16 @@ class TestAsyncExitStack(TestBaseExitStack, unittest.TestCase):
self.assertEqual(result, expected)
+ result = []
+ async with AsyncExitStack() as stack:
+ with self.assertRaises(TypeError):
+ stack.push_async_callback(arg=1)
+ with self.assertRaises(TypeError):
+ self.exit_stack.push_async_callback(arg=2)
+ with self.assertWarns(DeprecationWarning):
+ stack.push_async_callback(callback=_exit, arg=3)
+ self.assertEqual(result, [((), {'arg': 3})])
+
@_async_test
async def test_async_push(self):
exc_raised = ZeroDivisionError