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.file_errors_map == {
dest: format_error("Not a valid image file"),
}
After Change
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.file_errors == {
dest: format_error("Not a valid image file"),
}