diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-16 17:05:57 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-16 17:05:57 (GMT) |
commit | edc87f661c4a0e1642aa0878773d19b91e659435 (patch) | |
tree | 081b52080d77cb16cee788acfcb41af619b5c350 /Lib/test | |
parent | 9bb6fe52742340f6c92f0dda18599a4577a94e18 (diff) | |
parent | 11c135136d1fd5a14afdfeabf9d8fcd386a1c105 (diff) | |
download | cpython-edc87f661c4a0e1642aa0878773d19b91e659435.zip cpython-edc87f661c4a0e1642aa0878773d19b91e659435.tar.gz cpython-edc87f661c4a0e1642aa0878773d19b91e659435.tar.bz2 |
Merge heads
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() |