@pytest.fixture(scope='function')
def cr2_file(data_dir):
    cr2_path = os.path.join(data_dir, 'canon.cr2')
    if (not os.path.exists(cr2_path)):
        pytest.skip('No CR2 file found, skipping test.')
    with tempfile.TemporaryDirectory() as tmpdirname:
        copy_file = shutil.copy2(cr2_path, tmpdirname)
        (yield copy_file)
@pytest.fixture(scope='function')
def cr2_file(data_dir):
    cr2_path = os.path.join(data_dir, 'canon.cr2')
    if (not os.path.exists(cr2_path)):
        pytest.skip('No CR2 file found, skipping test.')
    with tempfile.TemporaryDirectory() as tmpdirname:
        copy_file = shutil.copy2(cr2_path, tmpdirname)
        (yield copy_file)