import shutil


def test_output_folder(project_root_path):
    """(Re)make an output folder for the tests
    at the begining of each test session."""
    folder = project_root_path / 'mfexport/tests/tmp'
    reset = True
    if reset:
        if folder.is_dir():
            shutil.rmtree(folder)
        folder.mkdir(parents=True)
    return folder