question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Write seems to be highly dependent from the OS making it untestable

See original GitHub issue

I’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:open
  • Created 3 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
leotrscommented, Nov 21, 2020

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.

1reaction
huguesdevimeuxcommented, Jun 17, 2020

@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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Write 3v1L, Untestable Code - Google Testing Blog
You want the transitive dependencies of every constructor to be enormous. Enormous is hard to get under test. Depend on Concrete Classes -...
Read more >
Is testable code better code?
It may seem silly to say it this way, but if you want to be able to test your code, then yes, writing...
Read more >
Best practices for writing Chrome OS unit tests
Prefer unit tests to functional tests · Use well-defined public interfaces · Avoiding side effects · Filesystem interaction · Dealing with time ·...
Read more >
Unit testing code with a file system dependency - Stack Overflow
that could change, in theory. I would abstract the code that deals with the OS into it's own module (class, assembly, jar, whatever)....
Read more >
Dependency bundling - LWN.net
I don't know why it seems to be so common to think that once you write software it should run on some random...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found