Skip to content

Commit 8f6103f

Browse files
authored
Merge pull request #16 from boutproject/debug-comp
Update reference images
2 parents 86e8e5c + d0dcc8a commit 8f6103f

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed
-14 Bytes
Loading
-14 Bytes
Loading
-14 Bytes
Loading

tests/tools.py

+8
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,16 @@ def _compare_animation(anim, expected, format_, nframes, tol):
5555
raise ImageComparisonFailure("image does not exist: %s" % expected_name)
5656

5757
if err:
58+
import base64
59+
60+
print("import base64")
5861
for key in ["actual", "expected"]:
5962
err[key] = os.path.relpath(err[key])
63+
with open(err[key], "rb") as f:
64+
print(
65+
f"with open(\"{err[key].replace('/','_')}\", \"wb\") as f:\n f.write(base64.b64decode({base64.b64encode(f.read())}))\n"
66+
)
67+
6068
raise ImageComparisonFailure(
6169
"images not close (RMS %(rms).3f):\n\t%(actual)s\n\t%(expected)s " % err
6270
)

0 commit comments

Comments
 (0)