summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2021-05-06 14:10:52 (GMT)
committerGitHub <noreply@github.com>2021-05-06 14:10:52 (GMT)
commit698e9a8211c46ed5dc93e5cd7026ea05dec2f373 (patch)
treee29b8550b52183a513e3ce536cd1ee13481f3a80 /Lib/unittest/test
parent985ac016373403e8ad41f8d563c4355ffa8d49ff (diff)
downloadcpython-698e9a8211c46ed5dc93e5cd7026ea05dec2f373.zip
cpython-698e9a8211c46ed5dc93e5cd7026ea05dec2f373.tar.gz
cpython-698e9a8211c46ed5dc93e5cd7026ea05dec2f373.tar.bz2
bpo-44017: Update test_contextlib_async not to emit DeprecationWarn (GH-25918)
Diffstat (limited to 'Lib/unittest/test')
-rw-r--r--Lib/unittest/test/testmock/testasync.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/unittest/test/testmock/testasync.py b/Lib/unittest/test/testmock/testasync.py
index e1866a3..122e695 100644
--- a/Lib/unittest/test/testmock/testasync.py
+++ b/Lib/unittest/test/testmock/testasync.py
@@ -173,8 +173,7 @@ class AsyncMockTest(unittest.TestCase):
def test_future_isfuture(self):
loop = asyncio.new_event_loop()
- asyncio.set_event_loop(loop)
- fut = asyncio.Future()
+ fut = loop.create_future()
loop.stop()
loop.close()
mock = AsyncMock(fut)