summaryrefslogtreecommitdiffstats
path: root/Lib/test/eintrdata
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-09-10 08:19:48 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-09-10 08:19:48 (GMT)
commitc50cccfcc3b3a9ef3fe7a78b7e7271930dc24aee (patch)
treeeff97d8782c3bf07cdecb78b5d5be0c4f94d7af7 /Lib/test/eintrdata
parente103aaca67be8316cd64c5d0aa9c54ba55f15b93 (diff)
downloadcpython-c50cccfcc3b3a9ef3fe7a78b7e7271930dc24aee.zip
cpython-c50cccfcc3b3a9ef3fe7a78b7e7271930dc24aee.tar.gz
cpython-c50cccfcc3b3a9ef3fe7a78b7e7271930dc24aee.tar.bz2
test_eintr: Fix ResourceWarning warnings
Diffstat (limited to 'Lib/test/eintrdata')
-rw-r--r--Lib/test/eintrdata/eintr_tester.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/eintrdata/eintr_tester.py b/Lib/test/eintrdata/eintr_tester.py
index 4fc79b1..9fbe04d 100644
--- a/Lib/test/eintrdata/eintr_tester.py
+++ b/Lib/test/eintrdata/eintr_tester.py
@@ -83,6 +83,9 @@ class OSEINTRTest(EINTRBaseTest):
processes = [self.new_sleep_process() for _ in range(num)]
for _ in range(num):
wait_func()
+ # Call the Popen method to avoid a ResourceWarning
+ for proc in processes:
+ proc.wait()
def test_wait(self):
self._test_wait_multiple(os.wait)
@@ -94,6 +97,8 @@ class OSEINTRTest(EINTRBaseTest):
def _test_wait_single(self, wait_func):
proc = self.new_sleep_process()
wait_func(proc.pid)
+ # Call the Popen method to avoid a ResourceWarning
+ proc.wait()
def test_waitpid(self):
self._test_wait_single(lambda pid: os.waitpid(pid, 0))