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

Comments

Projects
None yet
2 participants
@nicoddemus
Member

nicoddemus commented Oct 17, 2016

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 self-assigned this Oct 17, 2016

@RonnyPfannschmidt

This comment has been minimized.

Member

RonnyPfannschmidt commented Oct 17, 2016

this is a duplicate ^^

@RonnyPfannschmidt

This comment has been minimized.

Member

RonnyPfannschmidt commented Oct 17, 2016

@nicoddemus

This comment has been minimized.

Member

nicoddemus commented Oct 17, 2016

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

@kohr-h kohr-h referenced this issue Oct 21, 2016

Merged

Distribute tests #669

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment