File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 5
5
import tempfile
6
6
import numpy as np
7
7
8
- import manim
9
8
from manim import config , file_writer_config , logger
10
9
11
10
@@ -40,13 +39,17 @@ def set_test_scene(scene_object, module_name):
40
39
file_writer_config ["text_dir" ] = os .path .join (tmpdir , "text" )
41
40
file_writer_config ["tex_dir" ] = os .path .join (tmpdir , "tex" )
42
41
scene = scene_object ()
42
+ scene .render ()
43
43
data = scene .renderer .get_frame ()
44
44
45
+ assert not np .all (
46
+ data == np .array ([0 , 0 , 0 , 255 ])
47
+ ), f"Control data generated for { str (scene )} only contains empty pixels."
48
+ assert data .shape == (480 , 854 , 4 )
45
49
tests_directory = os .path .dirname (os .path .dirname (os .path .abspath (__file__ )))
46
50
path_control_data = os .path .join (
47
51
tests_directory , "control_data" , "graphical_units_data"
48
52
)
49
- print (path_control_data )
50
53
path = os .path .join (path_control_data , module_name )
51
54
if not os .path .isdir (path ):
52
55
os .makedirs (path )
You can’t perform that action at this time.
0 commit comments