Skip to content

pytest_plugins in non-root conftest inspection

pytest_plugins in non-root conftest inspection reports pytest_plugins assignments in non-root conftest.py files.

How to use it

Open a nested conftest.py file containing a pytest_plugins assignment. BetterPy highlights assignments that pytest will ignore.

When it helps

Use this inspection to move plugin declarations to the root conftest where pytest will honor them.

Notes

  • BetterPy uses pytest configuration discovery to distinguish root and nested conftest files.
  • The feature is gated by the pytest_plugins in non-root conftest inspection setting under Settings | BetterPy | Testing (Pytest) | Fixture Inspections.