[Python-checkins] Fix test error about deprecation warning (#30205)

asvetlov webhook-mailer at python.org
Sun Dec 19 13:12:45 EST 2021


https://github.com/python/cpython/commit/2352644377f0d2febc226ba30c94046e4cc50130
commit: 2352644377f0d2febc226ba30c94046e4cc50130
branch: 3.9
author: Andrew Svetlov <andrew.svetlov at gmail.com>
committer: asvetlov <andrew.svetlov at gmail.com>
date: 2021-12-19T20:12:24+02:00
summary:

Fix test error about deprecation warning (#30205)

files:
M Lib/test/test_asyncio/test_locks.py

diff --git a/Lib/test/test_asyncio/test_locks.py b/Lib/test/test_asyncio/test_locks.py
index cfb6421b38f60..b9aae360384ea 100644
--- a/Lib/test/test_asyncio/test_locks.py
+++ b/Lib/test/test_asyncio/test_locks.py
@@ -770,7 +770,8 @@ async def wrong_loop_in_cond():
                     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()



More information about the Python-checkins mailing list