diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2019-06-27 11:38:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 11:38:47 (GMT) |
commit | 97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9 (patch) | |
tree | 1b91bb67d4e16e5da39c9bd0f59d38020748049c /Lib/test/test_asyncio/test_streams.py | |
parent | 667eaffb4e5d03bf8129773f79649c3befaa5b1a (diff) | |
download | cpython-97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9.zip cpython-97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9.tar.gz cpython-97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9.tar.bz2 |
Replace deprecation warning with RuntimeError (GH-14397)
Diffstat (limited to 'Lib/test/test_asyncio/test_streams.py')
-rw-r--r-- | Lib/test/test_asyncio/test_streams.py | 6 |
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 a1c62ec..eab71e8 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() |