Skip to content

False-positive warning about assertion rewrite  #2005

@nicoddemus

Description

@nicoddemus

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.

Metadata

Metadata

Assignees

Labels

type: bugproblem that needs to be addressed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions