-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add context to find_unused_port #1837
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1837 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 22
Lines 2007 2007
=========================================
Hits 2007 2007 Continue to review full report at Codecov.
|
The function still says: Obviously the tests passed fine, but how does this work? Why is it not an issue to not close the socket before starting the test? |
The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
This reverts commit a9508d8.
This reverts commit a9508d8.
The helper function
find_unused_port
might return a port that will immediately be reused by the system.I wrapped the helper in a
contextmanager
so the port is allocated totempsock
while inside the context.This PR affects #1830, I will update it/this PR once one of them is accepted.