Skip to content

Fix pytest warning about cov#2708

Merged
gvanrossum merged 1 commit intomasterfrom
fix-pytest-warning
Jan 18, 2017
Merged

Fix pytest warning about cov#2708
gvanrossum merged 1 commit intomasterfrom
fix-pytest-warning

Conversation

@JukkaL
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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