Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Refactor tests (#2866)

ad_chaos677e88ef96e4
diff --git a/tests/test_commands.py b/tests/interface/test_commands.py
similarity index 92%
rename from tests/test_commands.py
rename to tests/interface/test_commands.py
index aec1d47d3..aed2bf179 100644
--- a/tests/test_commands.py
+++ b/tests/interface/test_commands.py
@@ -71,12 +71,16 @@ def test_manim_init_subcommand():
expected_main_py = ""
with open(
- Path.resolve(Path(__file__).parent.parent / "manim/templates/template.cfg"),
+ Path.resolve(
+ Path(__file__).parent.parent.parent / "manim/templates/template.cfg"
+ ),
) as f:
expected_manim_cfg = f.read()
with open(
- Path.resolve(Path(__file__).parent.parent / "manim/templates/Default.mtp"),
+ Path.resolve(
+ Path(__file__).parent.parent.parent / "manim/templates/Default.mtp"
+ ),
) as f:
expected_main_py = f.read()
diff --git a/tests/test_version.py b/tests/miscellaneous/test_version.py
similarity index 100%
rename from tests/test_version.py
rename to tests/miscellaneous/test_version.py
diff --git a/tests/test_animate.py b/tests/module/animation/test_animate.py
similarity index 100%
rename from tests/test_animate.py
rename to tests/module/animation/test_animate.py
diff --git a/tests/test_composition.py b/tests/module/animation/test_composition.py
similarity index 100%
rename from tests/test_composition.py
rename to tests/module/animation/test_composition.py
diff --git a/tests/test_override_animation.py b/tests/module/animation/test_override_animation.py
similarity index 100%
rename from tests/test_override_animation.py
rename to tests/module/animation/test_override_animation.py
diff --git a/tests/test_unit_geometry.py b/tests/module/mobject/geometry/test_unit_geometry.py
similarity index 100%
rename from tests/test_unit_geometry.py
rename to tests/module/mobject/geometry/test_unit_geometry.py
diff --git a/tests/test_axes_shift.py b/tests/module/mobject/graphing/test_axes_shift.py
similarity index 100%
rename from tests/test_axes_shift.py
rename to tests/module/mobject/graphing/test_axes_shift.py
diff --git a/tests/test_coordinate_system.py b/tests/module/mobject/graphing/test_coordinate_system.py
similarity index 100%
rename from tests/test_coordinate_system.py
rename to tests/module/mobject/graphing/test_coordinate_system.py
diff --git a/tests/test_number_line.py b/tests/module/mobject/graphing/test_number_line.py
similarity index 100%
rename from tests/test_number_line.py
rename to tests/module/mobject/graphing/test_number_line.py
diff --git a/tests/test_ticks.py b/tests/module/mobject/graphing/test_ticks.py
similarity index 100%
rename from tests/test_ticks.py
rename to tests/module/mobject/graphing/test_ticks.py
diff --git a/tests/test_copy.py b/tests/module/mobject/mobject/test_copy.py
similarity index 100%
rename from tests/test_copy.py
rename to tests/module/mobject/mobject/test_copy.py
diff --git a/tests/test_family.py b/tests/module/mobject/mobject/test_family.py
similarity index 100%
rename from tests/test_family.py
rename to tests/module/mobject/mobject/test_family.py
diff --git a/tests/test_get_set.py b/tests/module/mobject/mobject/test_get_set.py
similarity index 100%
rename from tests/test_get_set.py
rename to tests/module/mobject/mobject/test_get_set.py
diff --git a/tests/test_mobject.py b/tests/module/mobject/mobject/test_mobject.py
similarity index 100%
rename from tests/test_mobject.py
rename to tests/module/mobject/mobject/test_mobject.py
diff --git a/tests/test_opengl_metaclass.py b/tests/module/mobject/mobject/test_opengl_metaclass.py
similarity index 100%
rename from tests/test_opengl_metaclass.py
rename to tests/module/mobject/mobject/test_opengl_metaclass.py
diff --git a/tests/test_set_attr.py b/tests/module/mobject/mobject/test_set_attr.py
similarity index 100%
rename from tests/test_set_attr.py
rename to tests/module/mobject/mobject/test_set_attr.py
diff --git a/tests/test_svg_mobject.py b/tests/module/mobject/svg/test_svg_mobject.py
similarity index 100%
rename from tests/test_svg_mobject.py
rename to tests/module/mobject/svg/test_svg_mobject.py
diff --git a/tests/test_boolean_ops.py b/tests/module/mobject/test_boolean_ops.py
similarity index 100%
rename from tests/test_boolean_ops.py
rename to tests/module/mobject/test_boolean_ops.py
diff --git a/tests/test_graph.py b/tests/module/mobject/test_graph.py
similarity index 100%
rename from tests/test_graph.py
rename to tests/module/mobject/test_graph.py
diff --git a/tests/test_value_tracker.py b/tests/module/mobject/test_value_tracker.py
similarity index 100%
rename from tests/test_value_tracker.py
rename to tests/module/mobject/test_value_tracker.py
diff --git a/tests/test_markup.py b/tests/module/mobject/text/test_markup.py
similarity index 100%
rename from tests/test_markup.py
rename to tests/module/mobject/text/test_markup.py
diff --git a/tests/test_numbers.py b/tests/module/mobject/text/test_numbers.py
similarity index 100%
rename from tests/test_numbers.py
rename to tests/module/mobject/text/test_numbers.py
diff --git a/tests/test_texmobject.py b/tests/module/mobject/text/test_texmobject.py
similarity index 100%
rename from tests/test_texmobject.py
rename to tests/module/mobject/text/test_texmobject.py
diff --git a/tests/test_text_mobject.py b/tests/module/mobject/text/test_text_mobject.py
similarity index 100%
rename from tests/test_text_mobject.py
rename to tests/module/mobject/text/test_text_mobject.py
diff --git a/tests/test_stroke.py b/tests/module/mobject/types/vectorized_mobject/test_stroke.py
similarity index 100%
rename from tests/test_stroke.py
rename to tests/module/mobject/types/vectorized_mobject/test_stroke.py
diff --git a/tests/test_vectorized_mobject.py b/tests/module/mobject/types/vectorized_mobject/test_vectorized_mobject.py
similarity index 100%
rename from tests/test_vectorized_mobject.py
rename to tests/module/mobject/types/vectorized_mobject/test_vectorized_mobject.py
diff --git a/tests/test_auto_zoom.py b/tests/module/scene/test_auto_zoom.py
similarity index 100%
rename from tests/test_auto_zoom.py
rename to tests/module/scene/test_auto_zoom.py
diff --git a/tests/test_scene.py b/tests/module/scene/test_scene.py
similarity index 100%
rename from tests/test_scene.py
rename to tests/module/scene/test_scene.py
diff --git a/tests/test_sound.py b/tests/module/scene/test_sound.py
similarity index 100%
rename from tests/test_sound.py
rename to tests/module/scene/test_sound.py
diff --git a/tests/test_threed_scene.py b/tests/module/scene/test_threed_scene.py
similarity index 100%
rename from tests/test_threed_scene.py
rename to tests/module/scene/test_threed_scene.py
diff --git a/tests/test_color.py b/tests/module/utils/test_color.py
similarity index 100%
rename from tests/test_color.py
rename to tests/module/utils/test_color.py
diff --git a/tests/test_deprecation.py b/tests/module/utils/test_deprecation.py
similarity index 100%
rename from tests/test_deprecation.py
rename to tests/module/utils/test_deprecation.py
diff --git a/tests/test_file_ops.py b/tests/module/utils/test_file_ops.py
similarity index 86%
rename from tests/test_file_ops.py
rename to tests/module/utils/test_file_ops.py
index f8aaf1bcf..943a70f75 100644
--- a/tests/test_file_ops.py
+++ b/tests/module/utils/test_file_ops.py
@@ -3,9 +3,8 @@ from __future__ import annotations
from pathlib import Path
from manim import *
-
-from .assert_utils import assert_dir_exists, assert_file_not_exists
-from .utils.video_tester import *
+from tests.assert_utils import assert_dir_exists, assert_file_not_exists
+from tests.utils.video_tester import *
def test_guarantee_existence(tmp_path: Path):
diff --git a/tests/test_hashing.py b/tests/module/utils/test_hashing.py
similarity index 100%
rename from tests/test_hashing.py
rename to tests/module/utils/test_hashing.py
diff --git a/tests/test_space_ops.py b/tests/module/utils/test_space_ops.py
similarity index 100%
rename from tests/test_space_ops.py
rename to tests/module/utils/test_space_ops.py
diff --git a/tests/test_units.py b/tests/module/utils/test_units.py
similarity index 100%
rename from tests/test_units.py
rename to tests/module/utils/test_units.py