diff options
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/test/test_subprocess.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index bd3b9b46f7..540ad34d3f 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -2290,11 +2290,11 @@ class POSIXProcessTestCase(BaseTestCase): fds_to_keep = set(open_fds.pop() for _ in range(8)) p = subprocess.Popen([sys.executable, fd_status], stdout=subprocess.PIPE, close_fds=True, - pass_fds=()) + pass_fds=fds_to_keep) output, ignored = p.communicate() remaining_fds = set(map(int, output.split(b','))) - self.assertFalse(remaining_fds & fds_to_keep & open_fds, + self.assertFalse((remaining_fds - fds_to_keep) & open_fds, "Some fds not in pass_fds were left open") self.assertIn(1, remaining_fds, "Subprocess failed") |
