Skip to content

Commit 56035d4

Browse files
committed
Use private _set_event_loop_policy API to avoid DeprecationWarning
1 parent 9ed2acb commit 56035d4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Lib/test/test_asyncio/test_threads.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@
33
import asyncio
44
import unittest
55
import functools
6-
import warnings
76

87
from contextvars import ContextVar
98
from unittest import mock
109

1110

1211
def tearDownModule():
13-
with warnings.catch_warnings():
14-
warnings.simplefilter("ignore", DeprecationWarning)
15-
asyncio.set_event_loop_policy(None)
12+
asyncio._set_event_loop_policy(None)
1613

1714

1815
class ToThreadTests(unittest.IsolatedAsyncioTestCase):

0 commit comments

Comments
 (0)