]> granicus.if.org Git - python/commitdiff
bpo-37148: Fix asyncio test that check for warning when running the test suite with...
authorPablo Galindo <Pablogsal@gmail.com>
Tue, 4 Jun 2019 10:26:20 +0000 (11:26 +0100)
committerGitHub <noreply@github.com>
Tue, 4 Jun 2019 10:26:20 +0000 (11:26 +0100)
Lib/test/test_asyncio/test_streams.py

index df3d7e7dfa455ce280204cb4dab3b25c6ff2b71e..c1b9dc95ee621f09ab43432475e2de752bda351b 100644 (file)
@@ -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