You’ve run through a lot of the power of pytest in this chapter. Even with just what’s covered here, you can start supercharging your test suites. In many of the examples, you used a fixture called initialized_tasks_db. Fixtures can separate retrieving and/or generating test data from the real guts of a test function. They can also separate common code so that multiple test functions can use the same setup. In the next chapter, you’ll take a deep dive into the wonderful world of pytest fixtures.
13.58.120.57