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 setting the live server port. #500

Merged
merged 3 commits into from
Dec 21, 2017
Merged

Allow setting the live server port. #500

merged 3 commits into from
Dec 21, 2017

Conversation

dtomas
Copy link
Contributor

@dtomas dtomas commented Aug 1, 2017

As the possibility to define a fixed live server port has been added back in Django 1.11.2 (https://code.djangoproject.com/ticket/28212), I'd like to have it available in pytest-django as well.

@codecov-io
Copy link

codecov-io commented Oct 10, 2017

Codecov Report

Merging #500 into master will increase coverage by 0.01%.
The diff coverage is 95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #500      +/-   ##
==========================================
+ Coverage      92%   92.02%   +0.01%     
==========================================
  Files          33       33              
  Lines        1627     1643      +16     
  Branches      140      142       +2     
==========================================
+ Hits         1497     1512      +15     
  Misses         93       93              
- Partials       37       38       +1
Flag Coverage Δ
#dj110 84.05% <10%> (-1.08%) ⬇️
#dj111 86.12% <95%> (-2.51%) ⬇️
#dj18 84.9% <10%> (-0.72%) ⬇️
#dj19 83.93% <10%> (-0.89%) ⬇️
#dj20 84.35% <95%> (+0.03%) ⬆️
#djmaster 84.35% <95%> (+0.03%) ⬆️
#mysql_innodb 84.35% <95%> (+0.09%) ⬆️
#mysql_myisam 84.29% <95%> (+0.09%) ⬆️
#postgres 87.64% <95%> (-0.01%) ⬇️
#py27 89.4% <95%> (+0.04%) ⬆️
#py34 83.93% <10%> (-0.89%) ⬇️
#py35 84.05% <10%> (-0.71%) ⬇️
#py36 84.84% <95%> (+0.39%) ⬆️
#pypy ?
#pypy3 ?
#sqlite 86.12% <95%> (+0.01%) ⬆️
#sqlite_file 83.93% <10%> (-0.15%) ⬇️
Impacted Files Coverage Δ
pytest_django/live_server_helper.py 91.04% <100%> (+0.56%) ⬆️
tests/test_fixtures.py 100% <100%> (ø) ⬆️
pytest_django/fixtures.py 96.81% <80%> (-0.59%) ⬇️

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 4b508de...b4d0690. Read the comment docs.

@blueyed
Copy link
Contributor

blueyed commented Oct 27, 2017

@dtomas
Copy link
Contributor Author

dtomas commented Nov 17, 2017

My changes in fixtures.py should already be covered by test_fixtures.py. I'm not sure why they are shown as not covered, as most of the test code (except the one for versions 1.11.0 up to 1.11.2) seems to have been run.
I'm surprised that fixtures.py:314 onwards has not been executed while at the same time test_specified_port_range_error_message_django_111() seems to have been run and passed.
I might be misreading the codecov output though, not having worked with it before.

@blueyed
Copy link
Contributor

blueyed commented Nov 17, 2017

You are right, there seems to be an issue with the coverage reporting.

Please rebase it on master and force-push - let's see if that fixes it.

@blueyed blueyed closed this Nov 18, 2017
@blueyed blueyed reopened this Nov 18, 2017
@blueyed
Copy link
Contributor

blueyed commented Nov 18, 2017

I think #537 should have fixed this.
Re-triggering a build to get codecov report.

@blueyed
Copy link
Contributor

blueyed commented Nov 19, 2017

Coverage report seems to be correct now, but it shows that we do not test the non-current Django 1.11 (< 1.11.2 IIRC).
Maybe we should not support this after all, and remove the code regarding it? /cc @pelme

@avacore1337
Copy link

This patch solves our problems with testing our django REST framework application with selenium. Our Angular frontend doesn't really know what port to connect to otherwise. So thank you ^^

@blueyed blueyed merged commit d3d9bb3 into pytest-dev:master Dec 21, 2017
@blueyed
Copy link
Contributor

blueyed commented Dec 21, 2017

Thank you!

timb07 pushed a commit to timb07/pytest-django that referenced this pull request May 26, 2018
* Allow setting the live server port for Django >= 1.11.2.
* Removed warning when specifying live server port with Django >= 1.11 < 1.11.2.
* Added test for specifying a live server port with Django >= 1.11.2.
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.

None yet

4 participants