File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -214,6 +214,9 @@ async def _connect_pipes(self, waiter):
214214 for proto in self ._pipes .values ():
215215 if proto is not None :
216216 proto .pipe .close ()
217+ for raw_pipe in (proc .stdin , proc .stdout , proc .stderr ):
218+ if raw_pipe is not None and not raw_pipe .closed :
219+ raw_pipe .close ()
217220 if waiter is not None and not waiter .cancelled ():
218221 waiter .set_exception (exc )
219222 else :
Original file line number Diff line number Diff line change 1111from asyncio import subprocess
1212from test .test_asyncio import utils as test_utils
1313from test import support
14- from test .support import os_helper , warnings_helper , gc_collect
14+ from test .support import os_helper , gc_collect
1515
1616if not support .has_subprocess_support :
1717 raise unittest .SkipTest ("test module requires subprocess" )
@@ -1041,7 +1041,6 @@ async def run():
10411041
10421042 self .loop .run_until_complete (run ())
10431043
1044- @warnings_helper .ignore_warnings (category = ResourceWarning )
10451044 def test_subprocess_read_pipe_cancelled (self ):
10461045 async def main ():
10471046 loop = asyncio .get_running_loop ()
@@ -1052,7 +1051,6 @@ async def main():
10521051 asyncio .run (main ())
10531052 gc_collect ()
10541053
1055- @warnings_helper .ignore_warnings (category = ResourceWarning )
10561054 def test_subprocess_write_pipe_cancelled (self ):
10571055 async def main ():
10581056 loop = asyncio .get_running_loop ()
@@ -1063,7 +1061,6 @@ async def main():
10631061 asyncio .run (main ())
10641062 gc_collect ()
10651063
1066- @warnings_helper .ignore_warnings (category = ResourceWarning )
10671064 def test_subprocess_read_write_pipe_cancelled (self ):
10681065 async def main ():
10691066 loop = asyncio .get_running_loop ()
You can’t perform that action at this time.
0 commit comments