Blogmark

pytest on testing fixtures

via jbranchaud@gmail.com

https://docs.pytest.org/en/stable/explanation/fixtures.html

The term "fixture" in software testing feels like one of those overused catch-all words that loses meaning. When I hear the word my brain tends to translate it to "test setup". However, I like the definition that the pytest docs give:

In testing, a fixture provides a defined, reliable and consistent context for the tests. This could include environment (for example a database configured with known parameters) or content (such as a dataset).