summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-06-04 10:26:20 (GMT)
committerGitHub <noreply@github.com>2019-06-04 10:26:20 (GMT)
commit4cdbc452ce308bb55523e53963cabdc988e3f44b (patch)
treec15c1a110458b8e5644bfff0fac5d7a980319c4e /Lib/test
parent963eb0f4738456455b9bef7eb531b46805415208 (diff)
downloadcpython-4cdbc452ce308bb55523e53963cabdc988e3f44b.zip
cpython-4cdbc452ce308bb55523e53963cabdc988e3f44b.tar.gz
cpython-4cdbc452ce308bb55523e53963cabdc988e3f44b.tar.bz2
bpo-37148: Fix asyncio test that check for warning when running the test suite with huntleaks (GH-13800)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_asyncio/test_streams.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index df3d7e7..c1b9dc9 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -1229,10 +1229,14 @@ os.close(fd)
self.assertEqual(messages, [])
def test_stream_reader_create_warning(self):
+ with contextlib.suppress(AttributeError):
+ del asyncio.StreamReader
with self.assertWarns(DeprecationWarning):
asyncio.StreamReader
def test_stream_writer_create_warning(self):
+ with contextlib.suppress(AttributeError):
+ del asyncio.StreamWriter
with self.assertWarns(DeprecationWarning):
asyncio.StreamWriter