Skip to content

Add a tolerance for pixel perfect tests #274

@huguesdevimeux

Description

@huguesdevimeux

Basically the title.

The problem with pixel-perfect tests is that they are too perfect. Then, we spend so much time and energy in debugging a lot of small things (that are actually small bugs, I guess) but that didn't prevent the correct functioning of manim and were not worth the amount of time spent.

There are plenty of examples; I'm pretty sure every community dev has encountered at least one issue related to a single pixel differing, causing the entire test to fail.

My proposal would be to set a tolerance to a certain amount of pixel, like, if the frames differ from less than X pixels (or Y% pixels) then the assertion is not triggered and the test passes.
I propose to set Y to 10%.

I know that it may allow some bugs to go into manim; but the idea is not to waste too much time in debugging small and annoying things.

thoughts ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe would appreciate help on this issue/PRtestingAnything related to testing the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions