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

False-positive warning about assertion rewrite #2005

Closed
nicoddemus opened this issue Oct 17, 2016 · 3 comments
Closed

False-positive warning about assertion rewrite #2005

nicoddemus opened this issue Oct 17, 2016 · 3 comments
Assignees
Labels
type: bug problem that needs to be addressed

Comments

@nicoddemus
Copy link
Member

Consider:

# contents of conftest.py
pytest_plugins = 'plugin1'

# contents of test_foo.py
pytest_plugins = 'plugin1'

def test():
   pass

# plugin1.py is an empty file

pytest-3.0.3 provides this warning:

WP1 None Modules are already imported so can not be re-written: plugin1

But this is a false positive; what happens is that the code which verifies that a module needs to be rewritten but is already imported doesn't remember that the file was already rewritten on import.

@nicoddemus nicoddemus added the type: bug problem that needs to be addressed label Oct 17, 2016
@nicoddemus nicoddemus self-assigned this Oct 17, 2016
@RonnyPfannschmidt
Copy link
Member

this is a duplicate ^^

@RonnyPfannschmidt
Copy link
Member

#1840

@nicoddemus
Copy link
Member Author

Oh right. Do you mind if we close the other one? This one contains more information. 😁

nicoddemus added a commit to nicoddemus/pytest that referenced this issue Oct 19, 2016
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Oct 19, 2016
nicoddemus added a commit to nicoddemus/pytest that referenced this issue Oct 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

2 participants