summaryrefslogtreecommitdiff
path: root/Lib/test/test_asyncio
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2019-06-27 14:38:47 +0300
committerGitHub <noreply@github.com>2019-06-27 14:38:47 +0300
commit97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9 (patch)
tree1b91bb67d4e16e5da39c9bd0f59d38020748049c /Lib/test/test_asyncio
parent667eaffb4e5d03bf8129773f79649c3befaa5b1a (diff)
downloadcpython-git-97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9.tar.gz
Replace deprecation warning with RuntimeError (GH-14397)
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r--Lib/test/test_asyncio/test_streams.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_streams.py b/Lib/test/test_asyncio/test_streams.py
index a1c62ecee6..eab71e8030 100644
--- a/Lib/test/test_asyncio/test_streams.py
+++ b/Lib/test/test_asyncio/test_streams.py
@@ -1779,6 +1779,12 @@ os.close(fd)
self.loop.run_until_complete(test())
+ def test_stream_ctor_forbidden(self):
+ with self.assertRaisesRegex(RuntimeError,
+ "should be instantiated "
+ "by asyncio internals only"):
+ asyncio.Stream(asyncio.StreamMode.READWRITE)
+
if __name__ == '__main__':
unittest.main()