donkirkby/live-py-plugin

Report max diff in image

donkirkby opened this issue · 0 comments

What I did

I used a LiveImageDiffer to compare two images in a unit test.

What happened

The test was flaky, and would occasionally fail with an error like this:

AssertionError: Images differ by 716 pixels.

What I wanted to happen

If I decide I want to just work around this by increasing the tolerance, I can't tell how big I need to make it. It would be helpful to add the maximum difference to the error message:

AssertionError: Images differ by 716 pixels with a maximum difference of 1.

The current error message comes from the assert_equal() method.

My environment

Describe the versions of everything you were using:

  • space-tracer 4.9.0
  • Ubuntu 22.04
  • Python 3.10.10