Skip to content

bpo-32369: test_subprocess: Fix pass_fds check in test_close_fds()#4920

Merged
gpshead merged 1 commit into
python:masterfrom
izbyshev:bpo-32369
Dec 18, 2017
Merged

bpo-32369: test_subprocess: Fix pass_fds check in test_close_fds()#4920
gpshead merged 1 commit into
python:masterfrom
izbyshev:bpo-32369

Conversation

@izbyshev

@izbyshev izbyshev commented Dec 18, 2017

Copy link
Copy Markdown
Contributor

The last part of test_close_fds() doesn't match its own comment.
The following assertion always holds because fds_to_keep and open_fds
are disjoint by construction.

self.assertFalse(remaining_fds & fds_to_keep & open_fds,
                 "Some fds not in pass_fds were left open")

Fix the code to match the message in the assertion.

https://bugs.python.org/issue32369

The last part of test_close_fds() doesn't match its own comment.
The following assertion always holds because fds_to_keep and open_fds
are disjoint by construction.

self.assertFalse(remaining_fds & fds_to_keep & open_fds,
                 "Some fds not in pass_fds were left open")

Fix the code to match the message in the assertion.

@gpshead gpshead left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice code inspection find!

@gpshead gpshead merged commit 2d8f063 into python:master Dec 18, 2017
@izbyshev izbyshev deleted the bpo-32369 branch December 18, 2017 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants