In this chapter, we delved into one of pytest's most famous features: fixtures. We have seen how they can be used to provide resources and test functionality, and how to concisely express setup/teardown code. We learned how to share fixtures, using conftest.py files; to use fixture scopes, to avoid creating expensive resources for every test; and to autouse fixtures that are executed for all tests in the same module or hierarchy. Then, we learned how to parametrize fixtures and use marks from them. We took an overview of various built-in fixtures, and closed the chapter with some short discussions about fixtures in general. I hope you enjoyed the ride!
In the next chapter, we will explore a little of the vast pytest plugin ecosystem that is at your disposal.