diff --git a/tests/helpers/graphical_units.py b/tests/helpers/graphical_units.py index 94880e92e9..848754d38e 100644 --- a/tests/helpers/graphical_units.py +++ b/tests/helpers/graphical_units.py @@ -5,7 +5,6 @@ import tempfile import numpy as np -import manim from manim import config, file_writer_config, logger @@ -40,13 +39,17 @@ def set_test_scene(scene_object, module_name): file_writer_config["text_dir"] = os.path.join(tmpdir, "text") file_writer_config["tex_dir"] = os.path.join(tmpdir, "tex") scene = scene_object() + 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)