A community-maintained Python framework for creating mathematical animations.
added assertiions for graphical_units
Hugues Devimeux09a12d8ea62e
diff --git a/tests/helpers/graphical_units.py b/tests/helpers/graphical_units.pyindex 08d39040f..848754d38 100644--- a/tests/helpers/graphical_units.py+++ b/tests/helpers/graphical_units.py@@ -5,7 +5,6 @@ import osimport tempfileimport numpy as np-import manimfrom manim import config, file_writer_config, logger@@ -43,11 +42,14 @@ def set_test_scene(scene_object, module_name):scene.render()data = scene.renderer.get_frame()+ assert not np.all(+ data == np.array([0, 0, 0, 255])+ ), f"Control data generated for {str(scene)} only contains empty pixels."+ assert data.shape == (480, 854, 4)tests_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))path_control_data = os.path.join(tests_directory, "control_data", "graphical_units_data")- print(path_control_data)path = os.path.join(path_control_data, module_name)if not os.path.isdir(path):os.makedirs(path)