Pytest fixture redundant parameter inspection¶
Pytest fixture redundant parameter inspection reports fixture parameters that are already injected by pytest mechanisms.
How to use it¶
Open a test that declares a fixture parameter also supplied through autouse, usefixtures, or module-level pytestmark.
When it helps¶
Use this inspection to remove fixture parameters that are not referenced by the function body and only repeat existing injection.
Notes¶
- BetterPy avoids reporting parameters that are used in the function body.
- The feature is gated by the Pytest fixture redundant parameter inspection setting under Settings | BetterPy | Testing (Pytest) | Fixture Inspections.