Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

updated caching configuration

Hugues Devimeuxe483a5365463
diff --git a/tests/conftest.py b/tests/conftest.py
index 9626c1c28..08e943808 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -11,16 +11,21 @@ import logging
class SceneTester:
"""Class used to test the animations.
"""
- def __init__(self, scene_object, config_scene, module_tested):
- logging.disable(logging.CRITICAL) #Disable the logging, (--quiet is broken TODO
+ def __init__(self, scene_object, config_scene, module_tested, caching_needed = False):
+ logging.disable(logging.CRITICAL) #Disable the the logs, (--quiet is broken) TODO
self.path_tests_medias = os.path.join(
'manim', 'tests', 'tests_cache', module_tested)
self.path_tests_data = os.path.join(
'manim', 'tests', 'tests_data', module_tested)
- conf_dirs = {'media_dir': os.path.join(self.path_tests_medias, scene_object.__name__),
- 'video_dir': None, # os.path.join(self.path_tests_medias, scene_object.__name__, 'videos'),
- 'tex_dir': os.path.join(self.path_tests_medias, scene_object.__name__, 'Tex'),
- 'text_dir': None, #os.path.join(self.path_tests_medias, scene_object.__name__, 'text'),
+
+ tex_dir, text_dir = None, None
+ if caching_needed:
+ text_dir = os.path.join(self.path_tests_medias, scene_object.__name__, 'Text')
+ tex_dir = os.path.join(self.path_tests_medias, scene_object.__name__, 'Tex')
+ conf_dirs = {'media_dir': None,
+ 'video_dir': None,
+ 'tex_dir': tex_dir,
+ 'text_dir': text_dir,
}
# PROVISIONAL. To change when #98 is merged. TODO
config.initialize_directories(conf_dirs)