mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
asyncio: Close transports in tests
* Use test_utils.run_briefly() to execute pending calls to really close transports * sslproto: mock also _SSLPipe.shutdown(), it's need to close the transport * pipe test: the test doesn't close explicitly the PipeHandle, so ignore the warning instead * test_popen: use the context manager ("with p:") to explicitly close pipes
This commit is contained in:
parent
4bf22e033e
commit
ab8848bc2a
4 changed files with 15 additions and 3 deletions
|
@ -1180,6 +1180,8 @@ class SelectorSslTransportTests(test_utils.TestCase):
|
|||
self.sslsock.do_handshake.side_effect = exc
|
||||
with test_utils.disable_logger():
|
||||
transport._on_handshake(0)
|
||||
transport.close()
|
||||
test_utils.run_briefly(self.loop)
|
||||
|
||||
def test_pause_resume_reading(self):
|
||||
tr = self._make_one()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue