Fail pytest if there are unused fixtures

Having unused fixtures in the repository can lead to patches that remove fixtures unrelated to the patch. During the fixture rebuild process they deleted those unused fixtures, and they are not regenerated during the rebuild.

Address this problem by tracking which fixtures files are used across the test suite and adding a test that always runs last to compare the set of fixtures on disk against the fixtures that were actually used.

This additionally might allow people to notice that they have removed something they didn't intend to remove, as the fixture that exists will not get used.

Merge request reports

Loading