-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Port coverage report generation to pytest #978
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
Port coverage report generation to pytest #978
Conversation
Welcome @palnabarun! |
cc @micw523 |
f72aafa
to
57cf810
Compare
57cf810
to
5471df7
Compare
/assign @micw523 |
The coverage test is to provide a coverage report for codecov-io bot. It looks like you're running more tests than you need to - could you fix those? The tests in kubernetes/test does not have to be run for the coverage. |
tox.ini
Outdated
|
||
[testenv:coverage] | ||
commands = | ||
python -V | ||
nosetests --with-coverage --cover-package=kubernetes.config,kubernetes.watch --cover-tests | ||
pytest --ignore=kubernetes/e2e_test --cov=kubernetes/watch --cov=kubernetes/config |
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.
It looks like the tests for the dynamic client in base/dynamic are all e2e tests, which will be skipped by using pytest without a local cluster. If we are only testing the coverage for the watch and config folders we can skip those tests (for now).
Okay. I got it. I was assuming that |
One small caveat that I bumped into though. When I limited the test run to The test that I ran:
@micw523 Is it acceptable to have that? |
5471df7
to
5d4145e
Compare
Updates: When I saw the coverage on the Travis CI interface, the very same line seems to be covered now. Maybe I have some inconsistencies in my dev environment. |
/lgtm |
Adds pytest-cov to requirements
5d4145e
to
064b80e
Compare
@micw523 Done. Please approve. :) |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: palnabarun, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #976