]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix test error about deprecation warning (#30205)
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Sun, 19 Dec 2021 18:12:24 +0000 (20:12 +0200)
committerGitHub <noreply@github.com>
Sun, 19 Dec 2021 18:12:24 +0000 (20:12 +0200)
Lib/test/test_asyncio/test_locks.py

index cfb6421b38f60cd87c8c368af539b213d92f18ba..b9aae360384eaf4f01fdd44ad692a5e09fedca80 100644 (file)
@@ -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()