Every test file had its own copy-pasted TESTS_DIR/FIXTURES_DIR.
TestCompose used a value (self.conf) across tests.
Refactor this to use pytest fixtures instead:
Move fixtures_dir to a central pytest fixture in conftest.py, and reuse this across all tests that need it.
Make test_compose.py's old self.conf into a pytest fixture instead. This makes it less likely that we will accidentally mutate self.conf during a test and affect other tests. It also eliminates hacks in test_output_dir() where we had to use copy() when we did need to mutate the value for each test parameter.
Prior to this change:
Every test file had its own copy-pasted
TESTS_DIR
/FIXTURES_DIR
.TestCompose
used a value (self.conf
) across tests.Refactor this to use pytest fixtures instead:
Move
fixtures_dir
to a central pytest fixture inconftest.py
, and reuse this across all tests that need it.Make
test_compose.py
's oldself.conf
into a pytest fixture instead. This makes it less likely that we will accidentally mutateself.conf
during a test and affect other tests. It also eliminates hacks intest_output_dir()
where we had to usecopy()
when we did need to mutate the value for each test parameter.