|
6 | 6 | import pytest |
7 | 7 |
|
8 | 8 | from manim import logger |
9 | | -from manim import config |
| 9 | +from manim import config, file_writer_config |
10 | 10 |
|
11 | 11 |
|
12 | 12 | class SceneTester: |
@@ -34,15 +34,16 @@ class SceneTester: |
34 | 34 | def __init__(self, scene_object, module_tested, caching_needed=False): |
35 | 35 | # Disable the the logs, (--quiet is broken) TODO |
36 | 36 | logging.disable(logging.CRITICAL) |
37 | | - self.path_tests_medias_cache = os.path.join('tests_cache', module_tested) |
38 | | - self.path_tests_data = os.path.join('tests_data', module_tested) |
| 37 | + self.path_tests_medias_cache = os.path.join('tests', 'tests_cache', module_tested) |
| 38 | + self.path_tests_data = os.path.join('tests', 'tests_data', module_tested) |
39 | 39 |
|
40 | 40 | if caching_needed: |
41 | 41 | config['text_dir'] = os.path.join( |
42 | 42 | self.path_tests_medias_cache, scene_object.__name__, 'Text') |
43 | | - config['tex_dir'] = os.path.join( |
| 43 | + file_writer_config['tex_dir'] = os.path.join( |
44 | 44 | self.path_tests_medias_cache, scene_object.__name__, 'Tex') |
45 | 45 |
|
| 46 | + file_writer_config['skip_animations'] = True |
46 | 47 | config['pixel_height'] = 480 |
47 | 48 | config['pixel_width'] = 854 |
48 | 49 | config['frame_rate'] = 15 |
@@ -124,30 +125,12 @@ def set_test_scene(scene_object, module_name): |
124 | 125 | Normal usage:: |
125 | 126 | set_test_scene(DotTest, "geometry") |
126 | 127 | """ |
| 128 | + file_writer_config['skip_animations'] = True |
| 129 | + config['pixel_height'] = 480 |
| 130 | + config['pixel_width'] = 854 |
| 131 | + config['frame_rate'] = 15 |
127 | 132 |
|
128 | | - CONFIG_TEST = { |
129 | | - 'camera_config': { |
130 | | - 'frame_rate': 15, |
131 | | - 'pixel_height': 480, |
132 | | - 'pixel_width': 854 |
133 | | - }, |
134 | | - 'end_at_animation_number': None, |
135 | | - 'file_writer_config': { |
136 | | - 'file_name': None, |
137 | | - 'input_file_path': 'test.py', |
138 | | - 'movie_file_extension': '.mp4', |
139 | | - 'png_mode': 'RGB', |
140 | | - 'save_as_gif': False, |
141 | | - 'save_last_frame': False, |
142 | | - 'save_pngs': False, |
143 | | - 'write_to_movie': False |
144 | | - }, |
145 | | - 'leave_progress_bars': False, |
146 | | - 'skip_animations': True, |
147 | | - 'start_at_animation_number': None |
148 | | - } |
149 | | - |
150 | | - scene = scene_object(**CONFIG_TEST) |
| 133 | + scene = scene_object() |
151 | 134 | data = scene.get_frame() |
152 | 135 | path = os.path.join("manim", "tests", "tests_data", |
153 | 136 | "{}".format(module_name)) |
|
0 commit comments