Unused pytest fixture inspection¶
Unused pytest fixture inspection reports fixture functions that are not used by tests or other fixtures.
How to use it¶
Open a file containing pytest fixtures. BetterPy highlights fixtures that have no detected references.
When it helps¶
Use this inspection to remove dead fixture code and keep test support modules easier to navigate.
Notes¶
- BetterPy offers safe-delete for unused fixtures.
- The feature is gated by the Unused pytest fixture inspection setting under Settings | BetterPy | Testing (Pytest) | Fixture Inspections.