DIY Factories with Pytest

Pytest’s fixtures are a pretty convenient route to dependency injection throughout your tests. They’re flexible, too, and involve very little “magic.” This means they’re easy to learn, understand, and use correctly. The Pytest documentation explains that a fixture can pass back anything to the caller, including a function. This allows you to essentially create parameterized […]

The Hazards of Transactional Test Isolation

These days, it’s standard practice to run your unit and system tests with some degree of parallelism. When doing so, it’s important to ensure that the code being tested doesn’t interfere with other running tests. Usually, this comes down to the database layer. There are a few options for accomplishing isolation at the database layer. […]