Manim: List of tests to add

Created on 10 Jul 2020  路  7Comments  路  Source: ManimCommunity/manim

At the moment we only have last-frames tests. Although they are useful, it's not enough. We would need to have tests for cli flags, that check videos, etc. This issue will keep a list of tests that need to be added. Please make more suggestions for tests!

Tests that need to be added

  • [ ] We should have at least one test for each CLI flag.
  • [ ] We should test that the cascading priorities in the config system work as expected. Ties in with #201
  • [ ] We should create a test to certify a clean install. See #11.
  • [ ] Testing video content
  • [x] Test that manim runs correctly on all environments/prompts/versions #336
  • [ ] Regression test for #240
  • [ ] Test z-order stuff #327
  • [ ] Test to ensure MovingCamera and ZoomedScene let the camera move as they should. From #388 .
  • [ ] Test the functionality of asking the user for which scenes to render #523
  • [x] There are no tests for the -s flag or the -t flag
  • [ ] Test for add_fixed_in_frame_mobjects which is used in 3D scenes #569, currently broken
  • [ ] Tests for SVG images
  • [ ] @XorUnison Once video tests are implemented reverse_direction should get one
  • [ ] @XorUnison Test for Brace
testing

Most helpful comment

@leotrs :

The two subjects are well interconnected, we could say they're conjoined twins 鈥硷笍

Adding tests if do not exercise all the control flow paths may give a sense of security when in fact are only redundancies.

That's why coverage should be considered as integral part of the testing exercise.

my .01999....

All 7 comments

I recently came up with some good things like coverage.py which is great. What it actually does is checks how many parts of code is executed when the tests are running and how many doesn't(for example checks how many if condition code are not executed as so on). It make beautiful html report or we can something like https://codecov.io for managing that. Pretty much, it will help us determine how good our tests are and to prevent code breakage. I suggest we should set it up soon and it isn't hard to it.

Before looking into code coverage tools, I would like to see more tests.

@leotrs :

The two subjects are well interconnected, we could say they're conjoined twins 鈥硷笍

Adding tests if do not exercise all the control flow paths may give a sense of security when in fact are only redundancies.

That's why coverage should be considered as integral part of the testing exercise.

my .01999....

That's why coverage should be considered as integral part of the testing exercise.

I agree with that

Probably we can open a new issue for that. @huguesdevimeux

I agree that coverage should be taken into account, I just meant to say that right now the priority should go to writing tests. If anyone is looking into implementing coverage, that time would 100% be better spent by implementing more tests, as of right now.

Having said that, if anyone wants to do that now, then by all means. But deciding upon one more tool should be discussed in a separate issue, and we should talk about a tool that works for doctests as well, at least.

I just wanted to add that testing frames in the middle of each animation would be very helpful, since a lot of the changes I've been making have passed the tests even if they don't actually render the video properly. The only solution right now is to constantly run several animations and hope they offer enough coverage.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dakyion picture dakyion  路  8Comments

PgBiel picture PgBiel  路  5Comments

nilaybhatia picture nilaybhatia  路  7Comments

PgBiel picture PgBiel  路  5Comments

huguesdevimeux picture huguesdevimeux  路  6Comments