🐛 fix sequence frames

This commit is contained in:
Ondrej Samohel 2024-12-11 13:54:31 +01:00
parent 8fbf3fa053
commit e466da69eb
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -48,8 +48,10 @@ def single_file(tmp_path_factory: pytest.TempPathFactory) -> Path:
def sequence_files(tmp_path_factory: pytest.TempPathFactory) -> list[Path]:
"""Return a sequence of temporary image files."""
files = []
dir_name = tmp_path_factory.mktemp("sequence")
for i in range(SEQUENCE_LENGTH):
filename = tmp_path_factory.mktemp("sequence") / f"img.{i:04d}.png"
frame = i + 1
filename = dir_name / f"img.{frame:04d}.png"
with open(filename, "wb") as f:
f.write(base64.b64decode(PNG_FILE_B64))
files.append(filename)