Skip to content

Fix pytest warning about cov #2708

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

Merged
merged 1 commit into from
Jan 18, 2017
Merged

Fix pytest warning about cov #2708

merged 1 commit into from
Jan 18, 2017

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jan 18, 2017

Without this I get a pytest warning about cov every time I run it.
The cov plugin still gets loaded and I can still generate coverage
reports, so I assume that the coverage plugin is loaded
automatically. Not sure if we should require a more recent pytest
version.

This is what the warning looked like:

======================= pytest-warning summary ========================
WP1 None Module already imported so can not be re-written: pytest_cov

Without this I get a pytest warning about cov every time I run it.
The cov plugin still gets loaded and I can still generate coverage
reports, so I assume that the coverage plugin is loaded
automatically. Not sure if we should require a more recent pytest
version.

This is what the warning looked like:

```
======================= pytest-warning summary ========================
WP1 None Module already imported so can not be re-written: pytest_cov
```
@gvanrossum
Copy link
Member

I see this warning too. I've always just ignored it.

@cpennington Since you added the pytest_cov line to conftest.py, (in #2293) can you explain why you added it, and do you agree that it's fine to remove it? Maybe @gnprice or @ambv know what's going on here?

@cpennington
Copy link
Contributor

I think the pytest_cov plugin is what adds the --cov option used here: https://github.com/python/mypy/blob/master/runtests.py#L106. But we likely can do without that plugin, as well.

@gvanrossum
Copy link
Member

OK, confirmed that things still work, so merging.

@gvanrossum gvanrossum merged commit 9a1f6d6 into master Jan 18, 2017
@gvanrossum gvanrossum deleted the fix-pytest-warning branch January 18, 2017 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants