diff options
author | Yury Selivanov <yury@magic.io> | 2017-12-25 10:48:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-25 10:48:15 -0500 |
commit | 0cf16f9ea014b17d398ee3971d4976c698533318 (patch) | |
tree | c0a2ec1cc06a2519ea5b8a254de844ec1afb3955 /Lib/test/test_asyncio/test_futures.py | |
parent | 3dfbaf51f0d90646e0414ddbd3b513ee8e5ffe9b (diff) | |
download | cpython-git-0cf16f9ea014b17d398ee3971d4976c698533318.tar.gz |
bpo-32363: Disable Task.set_exception() and Task.set_result() (#4923)
Diffstat (limited to 'Lib/test/test_asyncio/test_futures.py')
-rw-r--r-- | Lib/test/test_asyncio/test_futures.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_futures.py b/Lib/test/test_asyncio/test_futures.py index f777a420b2..d3396162ba 100644 --- a/Lib/test/test_asyncio/test_futures.py +++ b/Lib/test/test_asyncio/test_futures.py @@ -370,7 +370,8 @@ class BaseFutureTests: def test(): arg1, arg2 = coro() - self.assertRaises(AssertionError, test) + with self.assertRaisesRegex(RuntimeError, "await wasn't used"): + test() fut.cancel() @mock.patch('asyncio.base_events.logger') |