def test_output_dirs() -> Generator: """ Fixture to automatically create a random directory before executing a test and then removing this directory after the test has been executed. """ # create dirs before executing the test root_dir = TEST_OUTPUTS_PATH / str(uuid.uuid4().hex) remove_and_create_folder(root_dir) print(f"Created temporary folder for test: {root_dir}") # let the test function run yield OutputFolderForTests(root_dir=root_dir)
def test_suite_setup() -> Generator: # create a default outputs root for all tests remove_and_create_folder(TEST_OUTPUTS_PATH) # run the entire test suite yield