Skip to content

Commit

Permalink
Merge pull request #16 from boutproject/debug-comp
Browse files Browse the repository at this point in the history
Update reference images
  • Loading branch information
dschwoerer authored Oct 11, 2023
2 parents 86e8e5c + d0dcc8a commit 8f6103f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Binary file modified tests/baseline_images/Blocks/Surface0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/Blocks/Surface1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/baseline_images/Blocks/Surface2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions tests/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,16 @@ def _compare_animation(anim, expected, format_, nframes, tol):
raise ImageComparisonFailure("image does not exist: %s" % expected_name)

if err:
import base64

print("import base64")
for key in ["actual", "expected"]:
err[key] = os.path.relpath(err[key])
with open(err[key], "rb") as f:
print(
f"with open(\"{err[key].replace('/','_')}\", \"wb\") as f:\n f.write(base64.b64decode({base64.b64encode(f.read())}))\n"
)

raise ImageComparisonFailure(
"images not close (RMS %(rms).3f):\n\t%(actual)s\n\t%(expected)s " % err
)
Expand Down

0 comments on commit 8f6103f

Please sign in to comment.