Write seems to be highly dependent from the OS making it untestable
See original GitHub issueI’m facing an incomprehensible issue with Write function.
To give a little bit of context, I’m building tests (yes, still … ) and so those tests are run on different OS (Linux - MacOs - Windows).
To test Write, I just compare the last frame generated with a pre-generated one: if it matches, all good, if not, something has been modified/broken.
BUT The Write test passes only on windows (see, for example, https://github.com/ManimCommunity/manim/runs/772124858). So I first thought "Well, it’s normal, since my Write test works with a Text object, it must be a font-related issue since the fonts are different from a system to another, and I generated the pre-rendered frames on windows so it’s logic. But no, because the Text test (that just test Text object, no animation (see https://github.com/ManimCommunity/manim/blob/b38d00a05e45c236535c16ab3ad19c5c73d5f2cb/tests/test_writing.py#L13 ) works on any system. I precise that the frame differs from -I think - a bunch of pixels - the difference does not seem to be visible.
So my guess is that the issue comes from Write directly. I tried to implement something that changes the data depending on the system we are testing on (i.e if on Linux, take the pre-rendered frame from Linux, etc) but nah, it didn’t work on both macOS and Ubuntu. (But worked on windows).
So I think I will purely remove this test. (If you agree, of course)
But my question is: Does anyone knows why does that happen?
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (17 by maintainers)

Top Related StackOverflow Question
I see. I think this (and possibly many other bugs) will be revealed once we have video tests (#618 ). We’re not too far away from getting those.
@Aathish04 Thank you very much for that, but sadly it does not work either. I really don’t know where does this come from.
So for the moment, I will just remove this test. I’ll put a comment referring to this issue instead. If someone knows something, don’t hesitate!