Skip to content

Commit 43cbdb2

Browse files
committed
test the deprecation warning
1 parent 5c5ce69 commit 43cbdb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_asyncio/test_events.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2690,7 +2690,8 @@ def test_set_event_loop_policy(self):
26902690
old_policy = asyncio.get_event_loop_policy()
26912691

26922692
policy = asyncio.DefaultEventLoopPolicy()
2693-
asyncio.set_event_loop_policy(policy)
2693+
with self.assertWarns(DeprecationWarning) as cm:
2694+
asyncio.set_event_loop_policy(policy)
26942695
self.assertIs(policy, asyncio.get_event_loop_policy())
26952696
self.assertIsNot(policy, old_policy)
26962697

0 commit comments

Comments
 (0)