A community-maintained Python framework for creating mathematical animations.
add test for the -s flag
leotrs694077c6805b
diff --git a/tests/test_scene_rendering/test_cli_flags.py b/tests/test_scene_rendering/test_cli_flags.pyindex aa815223a..e9fb2a3fc 100644--- a/tests/test_scene_rendering/test_cli_flags.py+++ b/tests/test_scene_rendering/test_cli_flags.py@@ -1,4 +1,5 @@import pytest+from pathlib import Pathfrom ..utils.video_tester import *@@ -61,3 +62,26 @@ def test_n_flag(tmp_path, simple_scenes_path):]_, err, exit_code = capture(command)assert exit_code == 0, err+++def test_s_flag(tmp_path, manim_cfg_file, simple_scenes_path):+ scene_name = "SquareToCircle"+ command = [+ "python",+ "-m",+ "manim",+ simple_scenes_path,+ scene_name,+ "-ql",+ "-s",+ "--media_dir",+ str(tmp_path),+ ]+ out, err, exit_code = capture(command)+ assert exit_code == 0, err++ is_empty = not any((tmp_path / 'videos').iterdir())+ assert is_empty, 'running manim with -s flag rendered a video'++ is_empty = not any((tmp_path / 'images').iterdir())+ assert not is_empty, 'running manim with -s flag did not render an image'