diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-27 11:58:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 11:58:34 (GMT) |
commit | 4cbe7a3ce4a46a5a2f3e56055a665e583fead62d (patch) | |
tree | 98e5f4426e0dd9753db67b080c251640bb0f4dad /Lib/test/test_asyncio/test_streams.py | |
parent | 7e9d706fd6e2f49d2bd829890c46868105767769 (diff) | |
download | cpython-4cbe7a3ce4a46a5a2f3e56055a665e583fead62d.zip cpython-4cbe7a3ce4a46a5a2f3e56055a665e583fead62d.tar.gz cpython-4cbe7a3ce4a46a5a2f3e56055a665e583fead62d.tar.bz2 |
Replace deprecation warning with RuntimeError (GH-14397)
(cherry picked from commit 97d15b1ee06ce80c4dbda91fb538a89bbcb2bed9)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
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() |