mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
bpo-43826: Fix resource warning due to unclosed objects. (GH-25381)
This commit is contained in:
parent
bb21e28fd0
commit
7179930ab5
1 changed files with 5 additions and 0 deletions
|
|
@ -719,6 +719,8 @@ def test_pipesizes(self):
|
|||
# However, this function is not yet in _winapi.
|
||||
p.stdin.write(b"pear")
|
||||
p.stdin.close()
|
||||
p.stdout.close()
|
||||
p.stderr.close()
|
||||
finally:
|
||||
p.kill()
|
||||
p.wait()
|
||||
|
|
@ -746,6 +748,8 @@ def test_pipesize_default(self):
|
|||
# On other platforms we cannot test the pipe size (yet). But above
|
||||
# code using pipesize=-1 should not crash.
|
||||
p.stdin.close()
|
||||
p.stdout.close()
|
||||
p.stderr.close()
|
||||
finally:
|
||||
p.kill()
|
||||
p.wait()
|
||||
|
|
@ -3243,6 +3247,7 @@ def test_send_signal_race2(self):
|
|||
with mock.patch.object(p, 'poll', new=lambda: None):
|
||||
p.returncode = None
|
||||
p.send_signal(signal.SIGTERM)
|
||||
p.kill()
|
||||
|
||||
def test_communicate_repeated_call_after_stdout_close(self):
|
||||
proc = subprocess.Popen([sys.executable, '-c',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue