diff options
| author | Yury Selivanov <yury@magic.io> | 2016-12-16 16:52:36 (GMT) |
|---|---|---|
| committer | Yury Selivanov <yury@magic.io> | 2016-12-16 16:52:36 (GMT) |
| commit | 7c3e71163b9aa53caf5e5b73520a07968f39686c (patch) | |
| tree | 4f6f5d0fd68c41602f151a63062e8952a3def893 /Lib/test | |
| parent | 5ab81d787f455ba28367b5b71606cea376283574 (diff) | |
| parent | 11c135136d1fd5a14afdfeabf9d8fcd386a1c105 (diff) | |
| download | cpython-7c3e71163b9aa53caf5e5b73520a07968f39686c.zip cpython-7c3e71163b9aa53caf5e5b73520a07968f39686c.tar.gz cpython-7c3e71163b9aa53caf5e5b73520a07968f39686c.tar.bz2 | |
Merge 3.6 (issue #28990)
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_asyncio/test_sslproto.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_sslproto.py b/Lib/test/test_asyncio/test_sslproto.py index 0ca6d1b..59ff0f6 100644 --- a/Lib/test/test_asyncio/test_sslproto.py +++ b/Lib/test/test_asyncio/test_sslproto.py @@ -85,5 +85,15 @@ class SslProtoHandshakeTests(test_utils.TestCase): # Restore error logging. log.logger.setLevel(log_level) + def test_connection_lost(self): + # From issue #472. + # yield from waiter hang if lost_connection was called. + waiter = asyncio.Future(loop=self.loop) + ssl_proto = self.ssl_protocol(waiter) + self.connection_made(ssl_proto) + ssl_proto.connection_lost(ConnectionAbortedError) + test_utils.run_briefly(self.loop) + self.assertIsInstance(waiter.exception(), ConnectionAbortedError) + if __name__ == '__main__': unittest.main() |
