Skip to content
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

allow custom port to TestServer #2613

Merged
merged 5 commits into from
Dec 18, 2017
Merged

allow custom port to TestServer #2613

merged 5 commits into from
Dec 18, 2017

Conversation

samuelcolvin
Copy link
Member

@samuelcolvin samuelcolvin commented Dec 18, 2017

What do these changes do?

Allow the port to be set when creating test servers (and therefore test clients).

This is useful when you want you want the port of a test server to fixed for a sesssion but the test server to be ephemeral and be (re)created for all tests.

Are there changes in behavior for the user?

Not unless they want to set the port

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes
  • Add a new news fragment into the CHANGES folder

@asvetlov
Copy link
Member

The PR assumes different approach for test writing than used by me usually (I prefer to find first unused port) but might be useful for some scenarios.

Ok with changes but please update documentation.

Copy link
Member

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

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

LGTM!
Please merge when green

@asvetlov
Copy link
Member

Ooops.
Forgot one thing: please add ..versionadded:: 3.0 for port related changes in documentation.

@samuelcolvin
Copy link
Member Author

docs added.

different approach for test writing than used by me usually

Same, but sometimes I want to decide the port in a session scoped fixture then use it in a test scoped fixture later.

@codecov-io
Copy link

codecov-io commented Dec 18, 2017

Codecov Report

Merging #2613 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2613      +/-   ##
=========================================
+ Coverage    97.9%   97.9%   +<.01%     
=========================================
  Files          38      38              
  Lines        7314    7317       +3     
  Branches     1270    1271       +1     
=========================================
+ Hits         7161    7164       +3     
  Misses         49      49              
  Partials      104     104
Impacted Files Coverage Δ
aiohttp/pytest_plugin.py 97.29% <100%> (ø) ⬆️
aiohttp/test_utils.py 98.57% <100%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4412fc9...71426e9. Read the comment docs.

@samuelcolvin samuelcolvin merged commit 9cc03cd into aio-libs:master Dec 18, 2017
@samuelcolvin samuelcolvin deleted the testservr-custom-port branch December 18, 2017 17:24
@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bot:chronographer:provided There is a change note present in this PR outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants