diff --git a/manim/animation/indication.py b/manim/animation/indication.py index 0daef10a57..43bc6d0103 100644 --- a/manim/animation/indication.py +++ b/manim/animation/indication.py @@ -1,6 +1,7 @@ import numpy as np from ..constants import * +from ..config import config from ..animation.animation import Animation from ..animation.movement import Homotopy from ..animation.composition import AnimationGroup @@ -45,7 +46,7 @@ def create_target(self): def create_starting_mobject(self): return Dot( - radius=FRAME_X_RADIUS + FRAME_Y_RADIUS, + radius=config['frame_x_radius'] + config['frame_y_radius'], stroke_width=0, fill_color=self.color, fill_opacity=0, diff --git a/manim/config.py b/manim/config.py index a866eb89dd..0311a72a78 100644 --- a/manim/config.py +++ b/manim/config.py @@ -177,7 +177,7 @@ def _parse_file_writer_config(config_parser, args): def _parse_cli(arg_list, input=True): parser = argparse.ArgumentParser( description='Animation engine for explanatory math videos', - epilog='Made with ❤ by the manim community devs' + epilog='Made with <3 by the manim community devs' ) if input: parser.add_argument( diff --git a/tests/test_cli/test_cli.py b/tests/test_cli/test_cli.py index da850a1479..ebe4462b86 100644 --- a/tests/test_cli/test_cli.py +++ b/tests/test_cli/test_cli.py @@ -16,13 +16,13 @@ def capture(command): def test_help(python_version): command = [python_version, "-m", "manim", "--help"] out, err, exitcode = capture(command) - assert exitcode == 0, f"Manim has been installed incorrectly. Please refer to the troubleshooting section on the wiki. Error:\n{err}" + assert exitcode == 0, f"Manim has been installed incorrectly. Please refer to the troubleshooting section on the wiki. Error:\n{err.decode()}" @pytest.mark.skip_end_to_end def test_basicScene(python_version): """ Simulate SquareToCircle. The cache will be saved in tests_caches/media_temp (temporary directory). This is mainly intended to test the partial-movies process. """ - path_basic_scene = os.path.join("tests_data", "basic_scenes.py") + path_basic_scene = os.path.join("tests", "tests_data", "basic_scenes.py") path_output = os.path.join("tests_cache", "media_temp") command = [python_version, "-m", "manim", path_basic_scene, "SquareToCircle", "-l", "--media_dir", path_output] @@ -35,7 +35,7 @@ def test_basicScene(python_version): @pytest.mark.skip_end_to_end def test_WriteStuff(python_version): """This is mainly intended to test the caching process of the tex objects""" - path_basic_scene = os.path.join("tests_data", "basic_scenes.py") + path_basic_scene = os.path.join("tests", "tests_data", "basic_scenes.py") path_output = os.path.join("tests_cache", "media_temp") command = [python_version, "-m", "manim", path_basic_scene, "WriteStuff", "-l", "--media_dir", path_output] diff --git a/tests/testing_utils.py b/tests/testing_utils.py index affd66e206..f8651de969 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -6,7 +6,7 @@ import pytest from manim import logger -from manim import config +from manim import config, file_writer_config class SceneTester: @@ -34,15 +34,16 @@ class SceneTester: def __init__(self, scene_object, module_tested, caching_needed=False): # Disable the the logs, (--quiet is broken) TODO logging.disable(logging.CRITICAL) - self.path_tests_medias_cache = os.path.join('tests_cache', module_tested) - self.path_tests_data = os.path.join('tests_data', module_tested) + self.path_tests_medias_cache = os.path.join('tests', 'tests_cache', module_tested) + self.path_tests_data = os.path.join('tests', 'tests_data', module_tested) if caching_needed: config['text_dir'] = os.path.join( self.path_tests_medias_cache, scene_object.__name__, 'Text') - config['tex_dir'] = os.path.join( + file_writer_config['tex_dir'] = os.path.join( self.path_tests_medias_cache, scene_object.__name__, 'Tex') + file_writer_config['skip_animations'] = True config['pixel_height'] = 480 config['pixel_width'] = 854 config['frame_rate'] = 15 @@ -124,30 +125,12 @@ def set_test_scene(scene_object, module_name): Normal usage:: set_test_scene(DotTest, "geometry") """ + file_writer_config['skip_animations'] = True + config['pixel_height'] = 480 + config['pixel_width'] = 854 + config['frame_rate'] = 15 - CONFIG_TEST = { - 'camera_config': { - 'frame_rate': 15, - 'pixel_height': 480, - 'pixel_width': 854 - }, - 'end_at_animation_number': None, - 'file_writer_config': { - 'file_name': None, - 'input_file_path': 'test.py', - 'movie_file_extension': '.mp4', - 'png_mode': 'RGB', - 'save_as_gif': False, - 'save_last_frame': False, - 'save_pngs': False, - 'write_to_movie': False - }, - 'leave_progress_bars': False, - 'skip_animations': True, - 'start_at_animation_number': None - } - - scene = scene_object(**CONFIG_TEST) + scene = scene_object() data = scene.get_frame() path = os.path.join("manim", "tests", "tests_data", "{}".format(module_name))