From: Andrew Svetlov Date: Sun, 19 Dec 2021 18:12:24 +0000 (+0200) Subject: Fix test error about deprecation warning (#30205) X-Git-Tag: v3.9.10~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2352644377f0d2febc226ba30c94046e4cc50130;p=thirdparty%2FPython%2Fcpython.git Fix test error about deprecation warning (#30205) --- diff --git a/Lib/test/test_asyncio/test_locks.py b/Lib/test/test_asyncio/test_locks.py index cfb6421b38f6..b9aae360384e 100644 --- a/Lib/test/test_asyncio/test_locks.py +++ b/Lib/test/test_asyncio/test_locks.py @@ -770,7 +770,8 @@ class ConditionTests(unittest.IsolatedAsyncioTestCase): ValueError, "loop argument must agree with lock" ): - asyncio.Condition(lock, loop=loop) + with self.assertWarns(DeprecationWarning): + asyncio.Condition(lock, loop=loop) await wrong_loop_in_lock() await wrong_loop_in_cond()