As I've been onboarding to my new position, I've been reviewing some of my coworker's code. I learned that pytest 1) has some built-in fixtures, and 2) they are really useful!
First, briefly, what are fixtures? When writing pytest tests, it's pretty frequent to write fixtures for reusability. They are used to set up tests. For example, a common fixture is:
@pytest.fixture()
def dataset_path():
return "/dataset/imagenet/train"






