Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Apply suggestions from code review [skip ci]

Hugues Devimeuxa96396534ae7
diff --git a/tests/test_geometry.py b/tests/test_geometry.py
index e6116fbef..5ee27c79a 100644
--- a/tests/test_geometry.py
+++ b/tests/test_geometry.py
@@ -4,10 +4,7 @@ from testing_utils import utils_test_scenes, get_scenes_to_test
class CoordinatesTest(Scene):
def construct(self):
- dots = []
- for x in range(-7, 8):
- for y in range(-4, 5):
- dots.append(Dot(np.array([x, y, 0])))
+ dots = [Dot(np.array([x, y, 0])) for x in range(-7, 8) for y in range(-4, 5)]
self.play(Animation(VGroup(*dots)))
@@ -121,4 +118,4 @@ class RoundedRectangleTest(Scene):
self.play(Animation(a))
def test_scenes(get_config_test):
- utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "geometry")
\ No newline at end of file
+ utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "geometry")
diff --git a/tests/test_graph.py b/tests/test_graph.py
index 72f317d29..c35048e45 100644
--- a/tests/test_graph.py
+++ b/tests/test_graph.py
@@ -4,14 +4,14 @@ from testing_utils import utils_test_scenes, get_scenes_to_test
class PlotFunctions(GraphScene):
CONFIG = {
- "x_min" : -10,
- "x_max" : 10.3,
- "y_min" : -1.5,
- "y_max" : 1.5,
- "graph_origin" : ORIGIN ,
- "function_color" : RED ,
- "axes_color" : GREEN,
- "x_labeled_nums" :range(-10,12,2),
+ "x_min": -10,
+ "x_max": 10.3,
+ "y_min": -1.5,
+ "y_max": 1.5,
+ "graph_origin": ORIGIN,
+ "function_color": RED,
+ "axes_color": GREEN,
+ "x_labeled_nums": range(-10,12,2),
}
def construct(self):
@@ -23,4 +23,4 @@ class PlotFunctions(GraphScene):
self.play(Animation(f))
def test_scenes(get_config_test):
- utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "graph", caching_needed=True)
\ No newline at end of file
+ utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "graph", caching_needed=True)
diff --git a/tests/testing_utils.py b/tests/testing_utils.py
index 3f515e18b..5b79907e4 100644
--- a/tests/testing_utils.py
+++ b/tests/testing_utils.py
@@ -15,20 +15,20 @@ class SceneTester:
Parameters
----------
- scene_object: : class:`Scene`
+ scene_object : :class:`~.Scene`
The scene to be tested
- config_scene : :class:`Dict`
+ config_scene : :class:`dict`
The configuration of the scene
- module_tested: :class:`str`
+ module_tested : :class:`str`
The name of the module tested. i.e if we are testing functions of creation.py, the module will be "creation"
Attributes
-----------
- path_tests_medias_cache : : class:`str`
+ path_tests_medias_cache : :class:`str`
Path to 'media' folder generated by manim. This folder contains cached data used by some tests.
- path_tests_data : : class:`str`
+ path_tests_data : :class:`str`
Path to the data used for the tests (i.e the pre-rendered frames).
- scene : :class:`Scene`
+ scene : :class:`~.Scene`
The scene tested
"""