ManimCommunity / ManimCommunity/manim

Use `--set_test` for both Frames and Video Tests

Open
#2,207 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

Currently one has to call the `save_control_data_from_video("", "SquareToCircleWithlFlag.json")` manually to create the control data. This is quite cumbersome and should be automated with the `--set_test` flag.

#2152 already automated this process but the flag isn't being respected. You have to uncomment a line to update the control data.
```py
# TODO: use when pytest --set_test option
# save_control_data_from_video(path_video_gen, control_data_file[:-5])
check_video_data(path_control_data, str(path_video_gen))
```
The `request` fixture-hack used in `frames_comparison.py` should also be implemented for video tests.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the request fixture hack in frames_comparison.py and the video-test code containing save_control_data_from_video and check_video_data. Run the video tests with pytest --set_test and trace why the flag is not respected. Done means both frame and video tests update control data through the flag without manually uncommenting code.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.