Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #974 from possibly a typo introduced in https://github.com/encode/uvicorn/pull/930/files#diff-716652db9a2feab62038753117d5e4fd4294f213f4c7f2edcb47b5788e5209f6L158-R190
I wanted to write a test, natural place seemed to be in
uvicorn/tests/test_main.py
Lines 29 to 43 in 83303ff
unfortunately I can see now way of getting the random assigned port (or the server socket for the same purpose) when we pass a port=0 after it has been created.
do you have an idea @florimondmanca ?