This is not how you use a pytest fixture: you pass it as an argument to you test function, which will then get pass the object returned by that fixture. Doing it this way defeats the mechanism and also the pytest caching etc.