A community-maintained Python framework for creating mathematical animations.
Rewrote test cases to use sys.executable in the command instead of "python" (#1100)
aebkea265e725ed768
diff --git a/tests/test_scene_rendering/test_caching_related.py b/tests/test_scene_rendering/test_caching_related.pyindex 2d7ddc708..6ace80a7a 100644--- a/tests/test_scene_rendering/test_caching_related.py+++ b/tests/test_scene_rendering/test_caching_related.py@@ -1,6 +1,7 @@import osimport pytestimport subprocess+import sysfrom ..utils.commands import capturefrom ..utils.video_tester import *@@ -15,7 +16,7 @@ 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 = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,@@ -39,7 +40,7 @@ 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 = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,diff --git a/tests/test_scene_rendering/test_cli_flags.py b/tests/test_scene_rendering/test_cli_flags.pyindex ef786383e..d01e1a18f 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+import sysimport numpy as npfrom PIL import Imagefrom pathlib import Path@@ -15,7 +16,7 @@ from manim.utils.file_ops import add_version_before_extensiondef test_basic_scene_with_default_values(tmp_path, manim_cfg_file, simple_scenes_path):scene_name = "SquareToCircle"command = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,@@ -34,7 +35,7 @@ def test_basic_scene_with_default_values(tmp_path, manim_cfg_file, simple_scenesdef test_basic_scene_l_flag(tmp_path, manim_cfg_file, simple_scenes_path):scene_name = "SquareToCircle"command = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,@@ -55,7 +56,7 @@ def test_basic_scene_l_flag(tmp_path, manim_cfg_file, simple_scenes_path):def test_n_flag(tmp_path, simple_scenes_path):scene_name = "SceneWithMultipleCalls"command = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,@@ -72,7 +73,7 @@ def test_n_flag(tmp_path, simple_scenes_path):def test_s_flag_no_animations(tmp_path, manim_cfg_file, simple_scenes_path):scene_name = "NoAnimations"command = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,@@ -96,7 +97,7 @@ def test_s_flag_no_animations(tmp_path, manim_cfg_file, simple_scenes_path):def test_s_flag(tmp_path, manim_cfg_file, simple_scenes_path):scene_name = "SquareToCircle"command = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,@@ -120,7 +121,7 @@ def test_s_flag(tmp_path, manim_cfg_file, simple_scenes_path):def test_r_flag(tmp_path, manim_cfg_file, simple_scenes_path):scene_name = "SquareToCircle"command = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,@@ -148,7 +149,7 @@ def test_r_flag(tmp_path, manim_cfg_file, simple_scenes_path):def test_custom_folders(tmp_path, manim_cfg_file, simple_scenes_path):scene_name = "SquareToCircle"command = [- "python",+ sys.executable,"-m","manim",simple_scenes_path,@@ -173,7 +174,7 @@ def test_custom_folders(tmp_path, manim_cfg_file, simple_scenes_path):def test_dash_as_filename(tmp_path):code = "class Test(Scene):\n def construct(self):\n self.add(Circle())\n self.wait(1)"command = [- "python",+ sys.executable,"-m","manim","-ql",