Quiz

Pytest Fixture Scope and Isolation

Understanding how fixture scope affects test isolation in pytest.

You have a fixture that creates a fresh database connection object and you want every single test function to get its own brand-new instance to guarantee test isolation. Which fixture scope should you use?