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:
Victor Stinner 2015-01-15 14:24:55 +01:00
parent 4bf22e033e
commit ab8848bc2a
4 changed files with 15 additions and 3 deletions

View file

@ -286,6 +286,7 @@ class SubprocessMixin:
# "Exception during subprocess creation, kill the subprocess"
with test_utils.disable_logger():
self.loop.run_until_complete(cancel_make_transport())
test_utils.run_briefly(self.loop)
if sys.platform != 'win32':