Skip to content

Commit 4cdbc45

Browse files
authored
bpo-37148: Fix asyncio test that check for warning when running the test suite with huntleaks (GH-13800)
1 parent 963eb0f commit 4cdbc45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_asyncio/test_streams.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,10 +1229,14 @@ def test_eof_feed_when_closing_writer(self):
12291229
self.assertEqual(messages, [])
12301230

12311231
def test_stream_reader_create_warning(self):
1232+
with contextlib.suppress(AttributeError):
1233+
del asyncio.StreamReader
12321234
with self.assertWarns(DeprecationWarning):
12331235
asyncio.StreamReader
12341236

12351237
def test_stream_writer_create_warning(self):
1238+
with contextlib.suppress(AttributeError):
1239+
del asyncio.StreamWriter
12361240
with self.assertWarns(DeprecationWarning):
12371241
asyncio.StreamWriter
12381242

0 commit comments

Comments
 (0)