A community-maintained Python framework for creating mathematical animations.
fixed conftest
Hugues Devimeuxabb220dac760
diff --git a/tests/conftest.py b/tests/conftest.pyindex 08e943808..058337ef0 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -11,21 +11,25 @@ import loggingclass SceneTester:"""Class used to test the animations."""- 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)++ def __init__(self, scene_object, config_scene, module_tested, caching_needed=False):+ # Disable the the logs, (--quiet is broken) TODO+ logging.disable(logging.CRITICAL)+ self.path_tests_medias = os.path.join(os.getcwd(),+ 'manim', 'tests', 'tests_cache', module_tested)+ self.path_tests_data = os.path.join(os.getcwd(),+ 'manim', 'tests', 'tests_data', module_tested)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')+ 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,+ 'video_dir': None,+ 'tex_dir': tex_dir,+ 'text_dir': text_dir,}# PROVISIONAL. To change when #98 is merged. TODOconfig.initialize_directories(conf_dirs)@@ -49,12 +53,13 @@ class SceneTester:assert(test_result), "The frames don't match. {} has been modified. Please ignore if it was intended".format(str(self.scene).replace('Test', ''))return 1-+@pytest.fixturedef Tester():return SceneTester+@pytest.fixturedef get_config_test():"""Function used internally by pytest as a fixture. Return the Configuration for the scenes rendered. The config is the one used when@@ -82,4 +87,3 @@ def get_config_test():'start_at_animation_number': None}return CONFIG-