def test_image_builder_fallback(tmpdir, src, colorspace):
dest = Path(tmpdir) / src.name
shutil.copy(str(src), str(dest))
files = [Path(d[0]).joinpath(f) for d in os.walk(tmpdir) for f in d[2]]
result = image_builder_fallback(files)
assert result.consumed_files == [dest]
image = result.new_images[0]
assert image.color_space == colorspace
After Change
def test_image_builder_fallback(tmpdir, src, colorspace):
dest = Path(tmpdir) / src.name
shutil.copy(str(src), str(dest))
files = {Path(d[0]).joinpath(f) for d in os.walk(tmpdir) for f in d[2]}
result = image_builder_fallback(files=files)
assert result.consumed_files == {dest}
assert len(result.new_images) == 1
image = result.new_images.pop()