Convert the test to use `pytest` and split out the individual tests. The temp-directory fixture has the session scope so that checkpoints can be shared between the individual tests.