mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
Replace deprecation warning with RuntimeError (GH-14397)
This commit is contained in:
parent
667eaffb4e
commit
97d15b1ee0
2 changed files with 8 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue