Skip to content

Pytest fixture uninjected reference inspection

Pytest fixture uninjected reference inspection reports fixture names referenced in a test or fixture without being declared as parameters.

How to use it

Open a pytest function that uses a fixture name directly without injecting it.

When it helps

Use this inspection to catch accidental global-looking fixture references that pytest will not inject automatically.

Notes

  • BetterPy focuses on fixture functions and pytest test contexts.
  • The feature is gated by the Pytest fixture uninjected reference inspection setting under Settings | BetterPy | Testing (Pytest) | Fixture Inspections.