manim/tests/test_scene_rendering/test_caching_related.py
Darylgolden 6018ebf445 Revert "Merge branch 'main' of https://github.com/ManimCommunity/manim"
This reverts commit e7f9d23aa7, reversing
changes made to afe91d02b6.
2023-07-31 15:29:39 +08:00

57 lines
1.3 KiB
Python

from __future__ import annotations
import sys
import pytest
from manim import capture
from ..utils.video_tester import *
@pytest.mark.slow
@video_comparison(
"SceneWithMultipleWaitCallsWithNFlag.json",
"videos/simple_scenes/480p15/SceneWithMultipleWaitCalls.mp4",
)
def test_wait_skip(tmp_path, manim_cfg_file, simple_scenes_path):
# Test for PR #468. Intended to test if wait calls are correctly skipped.
scene_name = "SceneWithMultipleWaitCalls"
command = [
sys.executable,
"-m",
"manim",
"-ql",
"--media_dir",
str(tmp_path),
"-n",
"3",
simple_scenes_path,
scene_name,
]
out, err, exit_code = capture(command)
assert exit_code == 0, err
@pytest.mark.slow
@video_comparison(
"SceneWithMultiplePlayCallsWithNFlag.json",
"videos/simple_scenes/480p15/SceneWithMultipleCalls.mp4",
)
def test_play_skip(tmp_path, manim_cfg_file, simple_scenes_path):
# Intended to test if play calls are correctly skipped.
scene_name = "SceneWithMultipleCalls"
command = [
sys.executable,
"-m",
"manim",
"-ql",
"--media_dir",
str(tmp_path),
"-n",
"3",
simple_scenes_path,
scene_name,
]
out, err, exit_code = capture(command)
assert exit_code == 0, err