fix tests · python/cpython@b6ac303 · GitHub
Skip to content

Commit b6ac303

Browse files
fix tests
1 parent fce0416 commit b6ac303

3 files changed

Lines changed: 27 additions & 10 deletions

File tree

Lib/test/test_asyncio/test_events.py

Lines changed: 7 additions & 3 deletions

Lib/test/test_asyncio/test_streams.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import threading
1010
import unittest
1111
from unittest import mock
12+
import warnings
1213
from test.support import socket_helper
1314
try:
1415
import ssl
@@ -791,8 +792,9 @@ def test_read_all_from_pipe_reader(self):
791792
protocol = asyncio.StreamReaderProtocol(reader, loop=self.loop)
792793
transport, _ = self.loop.run_until_complete(
793794
self.loop.connect_read_pipe(lambda: protocol, pipe))
794-
795-
watcher = asyncio.SafeChildWatcher()
795+
with warnings.catch_warnings():
796+
warnings.simplefilter('ignore', DeprecationWarning)
797+
watcher = asyncio.SafeChildWatcher()
796798
watcher.attach_loop(self.loop)
797799
try:
798800
asyncio.set_child_watcher(watcher)

Lib/test/test_asyncio/test_unix_events.py

Lines changed: 16 additions & 5 deletions

0 commit comments

Comments
 (0)