diff --git a/.travis.yml b/.travis.yml index dd8405199a..327b93befd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ jobs: - os: linux language: python - python: 3.7 + python: 3.7 install: - pip3 install --upgrade pip - pip3 install -r ./.travis/travis-requirements.txt @@ -39,6 +39,11 @@ jobs: language: sh python: 3.6 env: PYVER="3.6.10" + before_install: + - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null + - brew install ffmpeg + - brew cask install mactex + - eval "$(/usr/libexec/path_helper)" install: - pip3 install --upgrade pip - pip3 install -r ./.travis/travis-requirements.txt @@ -51,6 +56,11 @@ jobs: language: sh python: 3.7 env: PYVER="3.7.7" + before_install: + - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null + - brew install ffmpeg + - brew cask install mactex + - eval "$(/usr/libexec/path_helper)" install: - pip3 install --upgrade pip - pip3 install -r ./.travis/travis-requirements.txt @@ -63,6 +73,11 @@ jobs: language: sh python: 3.8 env: PYVER="3.8.0" # Using Python 3.8.0 due to error with rich + before_install: + - ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null + - brew install ffmpeg + - brew cask install mactex + - eval "$(/usr/libexec/path_helper)" install: - pip3 install --upgrade pip - pip3 install -r ./.travis/travis-requirements.txt @@ -80,7 +95,6 @@ jobs: install: - choco install python --version=$PYVER - export PATH="/c/$PYDIR:/c/$PYDIR/Scripts:$PATH" - - choco install ffmpeg - cmd.exe //c "RefreshEnv.cmd" - python -m pip install --upgrade pip - python -m pip install --user -r ./.travis/travis-requirements.txt @@ -88,7 +102,7 @@ jobs: - cmd.exe //c "RefreshEnv.cmd" - python -m pip install --user . script: - - python -m pytest + - python -m pytest --skip_end_to_end -rs - os: windows language: sh @@ -97,7 +111,6 @@ jobs: install: - choco install python --version=$PYVER - export PATH="/c/$PYDIR:/c/$PYDIR/Scripts:$PATH" - - choco install ffmpeg - cmd.exe //c "RefreshEnv.cmd" - python -m pip install --upgrade pip - python -m pip install --user -r ./.travis/travis-requirements.txt @@ -105,7 +118,7 @@ jobs: - cmd.exe //c "RefreshEnv.cmd" - python -m pip install --user . script: - - python -m pytest + - python -m pytest --skip_end_to_end -rs - os: windows language: sh @@ -114,7 +127,6 @@ jobs: install: - choco install python --version=$PYVER - export PATH="/c/$PYDIR:/c/$PYDIR/Scripts:$PATH" - - choco install ffmpeg - cmd.exe //c "RefreshEnv.cmd" - python -m pip install --upgrade pip - python -m pip install --user -r ./.travis/travis-requirements.txt @@ -122,11 +134,11 @@ jobs: - cmd.exe //c "RefreshEnv.cmd" - python -m pip install --user . script: - - python -m pytest + - python -m pytest --skip_end_to_end -rs before_install: - if [ "$TRAVIS_OS_NAME" == "osx" ]; then chmod +x ./.travis/osx.sh; sh ./.travis/osx.sh; fi - + - if [ "$TRAVIS_OS_NAME" == "linux" ]; then chmod +x ./.travis/linux.sh; sh ./.travis/linux.sh; fi branches: only: - master diff --git a/.travis/linux.sh b/.travis/linux.sh new file mode 100644 index 0000000000..bbb6471e46 --- /dev/null +++ b/.travis/linux.sh @@ -0,0 +1,5 @@ +##### THIS IS FOR TRAVIS BUILDS, DO NOT RUN THIS ON YOUR COMPUTER! ##### + +sudo apt update +sudo apt install -y ffmpeg +sudo apt-get -y install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000000..bac45335b7 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,63 @@ +from manim import dirs +from manim import config + +import pytest +import numpy as np +import os +import sys +import logging + + +def pytest_addoption(parser): + parser.addoption("--skip_end_to_end", action="store_true", default=False, + help="Will skip all the end-to-end tests. Useful when ffmpeg is not installed, e.g. on Windows jobs.") + + +def pytest_configure(config): + config.addinivalue_line( + "markers", "skip_end_to_end: mark test as end_to_end test") + + +def pytest_collection_modifyitems(config, items): + if not config.getoption("--skip_end_to_end"): + return + else: + skip_end_to_end = pytest.mark.skip( + reason="End to end test skipped due to --skip_end_to_end flag") + for item in items: + if "skip_end_to_end" in item.keywords: + item.add_marker(skip_end_to_end) + + +@pytest.fixture(scope="module") +def python_version(): + return "python3" if sys.platform == "darwin" else "python" + + +@pytest.fixture +def 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 + calling the flags -s -l -dry_run + """ + CONFIG = { + '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 + } + return CONFIG diff --git a/tests/test_CLI.py b/tests/test_CLI.py new file mode 100644 index 0000000000..9bb48fc8a9 --- /dev/null +++ b/tests/test_CLI.py @@ -0,0 +1,46 @@ +import subprocess +import os +from shutil import rmtree +import pytest + + +def capture(command): + proc = subprocess.Popen(command, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + ) + out, err = proc.communicate() + return out, err, proc.returncode + + +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: {err}" + + +@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", "tests_data", "basic_scenes.py") + path_output = os.path.join("tests", "tests_cache", "media_temp") + command = [python_version, "-m", "manim", path_basic_scene, + "SquareToCircle", "-l", "--media_dir", path_output] + out, err, exitcode = capture(command) + assert exitcode == 0, err + assert os.path.exists(os.path.join( + path_output, "videos", "basic_scenes", "480p15", "SquareToCircle.mp4")), err + rmtree(path_output) + +@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", "tests_data", "basic_scenes.py") + path_output = os.path.join("tests", "tests_cache", "media_temp") + command = [python_version, "-m", "manim", path_basic_scene, + "WriteStuff", "-l", "--media_dir", path_output] + out, err, exitcode = capture(command) + assert exitcode == 0, err + assert os.path.exists(os.path.join( + path_output, "videos", "basic_scenes", "480p15", "WriteStuff.mp4")), err + rmtree(path_output) diff --git a/tests/test_creation.py b/tests/test_creation.py new file mode 100644 index 0000000000..edf682086c --- /dev/null +++ b/tests/test_creation.py @@ -0,0 +1,93 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +class ShowCreationTest(Scene): + def construct(self): + square = Square() + self.play(ShowCreation(square)) + + +class UncreateTest(Scene): + def construct(self): + square = Square() + self.add(square) + self.play(Uncreate(square)) + + +class DrawBorderThenFillTest(Scene): + def construct(self): + square = Square(fill_opacity=1) + self.play(DrawBorderThenFill(square)) + + +# NOTE : Here should be the Write Test. But for some reasons it appears that this function is untestable (see issue #157) + +class FadeOutTest(Scene): + def construct(self): + square = Square() + self.add(square) + self.play(FadeOut(square)) + + +class FadeInTest(Scene): + def construct(self): + square = Square() + self.play(FadeIn(square)) + + +class FadeInFromTest(Scene): + def construct(self): + square = Square() + self.play(FadeInFrom(square, direction=UP)) + + +class FadeInFromDownTest(Scene): + def construct(self): + square = Square() + self.play(FadeInFromDown(square)) + + +class FadeOutAndShiftTest(Scene): + def construct(self): + square = Square() + self.play(FadeOutAndShift(square, direction=UP)) + + +class FadeInFromLargeTest(Scene): + def construct(self): + square = Square() + self.play(FadeInFromLarge(square)) + + +class GrowFromPointTest(Scene): + def construct(self): + square = Square() + self.play(GrowFromPoint(square, np.array((1, 1, 0)))) + + +class GrowFromCenterTest(Scene): + def construct(self): + square = Square() + self.play(GrowFromCenter(square)) + + +class GrowFromEdgeTest(Scene): + def construct(self): + square = Square() + self.play(GrowFromEdge(square, DOWN)) + + +class SpinInFromNothingTest(Scene): + def construct(self): + square = Square() + self.play(SpinInFromNothing(square)) + + +class ShrinkToCenterTest(Scene): + def construct(self): + square = Square() + self.play(ShrinkToCenter(square)) + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "creation") diff --git a/tests/test_geometry.py b/tests/test_geometry.py new file mode 100644 index 0000000000..5fbd9aa89c --- /dev/null +++ b/tests/test_geometry.py @@ -0,0 +1,108 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +class CoordinatesTest(Scene): + def construct(self): + dots = [Dot(np.array([x, y, 0])) for x in range(-7, 8) for y in range(-4, 5)] + + self.play(Animation(VGroup(*dots))) + + +class ArcTest(Scene): + def construct(self): + a = Arc(PI) + self.play(Animation(a)) + + +class ArcBetweenPointsTest(Scene): + def construct(self): + a = ArcBetweenPoints(np.array([1, 1, 0]), np.array([2, 2, 0])) + self.play(Animation(a)) + + +class CurvedArrowTest(Scene): + def construct(self): + a = CurvedArrow(np.array([1, 1, 0]), np.array([2, 2, 0])) + self.play(Animation(a)) + + +class CircleTest(Scene): + def construct(self): + circle = Circle() + self.play(Animation(circle)) + + +class DotTest(Scene): + def construct(self): + dot = Dot() + self.play(Animation(dot)) + + +class EllipseTest(Scene): + def construct(self): + e = Ellipse() + self.play(Animation(e)) + + +class SectorTest(Scene): + def construct(self): + e = Sector() + self.play(Animation(e)) + + +class AnnulusTest(Scene): + def construct(self): + a = Annulus() + self.play(Animation(a)) + + +class AnnularSectorTest(Scene): + def construct(self): + a = AnnularSector() + self.play(Animation(a)) + + +class LineTest(Scene): + def construct(self): + a = Line(np.array([1, 1, 0]), np.array([2, 2, 0])) + self.play(Animation(a)) + + +class Elbowtest(Scene): + def construct(self): + a = Elbow() + self.play(Animation(a)) + + +class DoubleArrowTest(Scene): + def construct(self): + a = DoubleArrow() + self.play(Animation(a)) + + +class VectorTest(Scene): + def construct(self): + a = Vector(UP) + self.play(Animation(a)) + + +class PolygonTest(Scene): + def construct(self): + a = Polygon( + *[np.array([1, 1, 0]), np.array([2, 2, 0]), np.array([2, 3, 0])]) + self.play(Animation(a)) + + +class RectangleTest(Scene): + def construct(self): + a = Rectangle() + self.play(Animation(a)) + +class RoundedRectangleTest(Scene): + def construct(self): + a = RoundedRectangle() + self.play(Animation(a)) + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "geometry") diff --git a/tests/test_graph.py b/tests/test_graph.py new file mode 100644 index 0000000000..e2ae2eccbd --- /dev/null +++ b/tests/test_graph.py @@ -0,0 +1,25 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +class PlotFunctions(GraphScene): + CONFIG = { + "x_min": -10, + "x_max": 10.3, + "y_min": -1.5, + "y_max": 1.5, + "graph_origin": ORIGIN, + "function_color": RED, + "axes_color": GREEN, + "x_labeled_nums": range(-10,12,2), + } + + def construct(self): + constants.TEX_TEMPLATE = TexTemplate() + self.setup_axes() + f = self.get_graph(lambda x: x**2) + + self.play(Animation(f)) + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "graph", caching_needed=True) diff --git a/tests/test_indication.py b/tests/test_indication.py new file mode 100644 index 0000000000..10207771b4 --- /dev/null +++ b/tests/test_indication.py @@ -0,0 +1,79 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +class FocusOnTest(Scene): + def construct(self): + square = Square() + self.add(square) + self.play(FocusOn(square)) + + +class IndicateTest(Scene): + def construct(self): + square = Square() + self.play(Indicate(square)) + + +class FlashTest(Scene): + def construct(self): + square = Square() + self.add(square) + self.play(Flash(square)) + + +class CircleIndicateTest(Scene): + def construct(self): + square = Square() + self.add(square) + self.play(CircleIndicate(square)) + + +class ShowPassingFlashTest(Scene): + def construct(self): + square = Square() + self.add(square) + self.play(ShowPassingFlash(square)) + + +class ShowCreationThenDestructionTest(Scene): + def construct(self): + square = Square() + self.play(ShowCreationThenDestruction(square)) + + +class ShowCreationThenFadeOutTest(Scene): + def construct(self): + square = Square() + self.play(ShowCreationThenFadeOut(square)) + + +class ShowPassingFlashAroundTest(Scene): + def construct(self): + circle = Circle() + self.play(ShowPassingFlashAround(circle)) + + +class ApplyWaveTest(Scene): + def construct(self): + square = Square() + self.play(ApplyWave(square)) + + +class WiggleOutThenInTest(Scene): + def construct(self): + square = Square() + self.add(square) + self.play(WiggleOutThenIn(square)) + + +class TurnInsideOutTest(Scene): + def construct(self): + square = Square() + self.add(square) + self.play(TurnInsideOut(square)) + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "indication") + + diff --git a/tests/test_movements.py b/tests/test_movements.py new file mode 100644 index 0000000000..ed2774b95d --- /dev/null +++ b/tests/test_movements.py @@ -0,0 +1,50 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +class HomotopyTest(Scene): + def construct(self): + def func(x, y, z, t): + norm = get_norm([x, y]) + tau = interpolate(5, -5, t) + norm/FRAME_X_RADIUS + alpha = sigmoid(tau) + return [x, y + 0.5*np.sin(2*np.pi*alpha)-t*SMALL_BUFF/2, z] + square = Square() + self.play(Homotopy(func, square)) + + +class PhaseFlowTest(Scene): + def construct(self): + square = Square() + def func(t): + return t*0.5*UP + self.play(PhaseFlow(func, square)) + + +class MoveAlongPathTest(Scene): + def construct(self): + square = Square() + dot = Dot() + self.play(MoveAlongPath(dot, square)) + + +class RotateTest(Scene): + def construct(self): + square = Square() + self.play(Rotate(square, PI)) + + +class MoveToTest(Scene): + def construct(self): + square = Square() + self.play(square.move_to, np.array([1.0, 1.0, 0.0])) + + +class ShiftTest(Scene): + def construct(self): + square = Square() + self.play(square.shift, UP) + + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "movements") diff --git a/tests/test_sample_scenes.py b/tests/test_sample_scenes.py deleted file mode 100644 index af2c318a91..0000000000 --- a/tests/test_sample_scenes.py +++ /dev/null @@ -1,62 +0,0 @@ -from manim import * - -# This file is intended to test any new feature added. -# Feel free to add a test or to modify one when adding a new/changing a feature. -class BasicScene(Scene): - def construct(self): - square = Square() - self.play(ShowCreation(square)) - - -class GeometryScene(Scene): - def construct(self): - circle = Circle() - square = Square() - square.flip(RIGHT) - square.rotate(-3 * TAU / 8) - circle.set_fill(PINK, opacity=0.5) - self.play(ShowCreation(square)) - self.play(Transform(square, circle)) - self.play(FadeOut(square)) - - text = Text("Testing !") - self.play(DrawBorderThenFill(text)) - - decimal = DecimalNumber( - 0, - show_ellipsis=True, - num_decimal_places=3, - include_sign=True, - ) - square = Square().to_edge(UP) - - decimal.add_updater(lambda d: d.next_to(square, RIGHT)) - decimal.add_updater(lambda d: d.set_value(square.get_center()[1])) - self.add(square, decimal) - self.play( - square.to_edge, DOWN, - rate_func=there_and_back, - run_time=1, - ) - self.wait() - - -class PlottingScene(GraphScene): - CONFIG = { - "x_min" : -10, - "x_max" : 10.3, - "y_min" : -1.5, - "y_max" : 1.5, - "graph_origin" : ORIGIN , - "function_color" : RED , - "axes_color" : GREEN, - "x_labeled_nums" :range(-10,12,2), - } - def construct(self): - self.setup_axes(animate=False) - func_graph = self.get_graph(lambda x : x**2, self.function_color) - self.play(ShowCreation(func_graph)) - - -def test_scenes(): - BasicScene() diff --git a/tests/test_threed.py b/tests/test_threed.py new file mode 100644 index 0000000000..ff75e983c7 --- /dev/null +++ b/tests/test_threed.py @@ -0,0 +1,35 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +class CubeTest(ThreeDScene): + def construct(self): + self.play(Animation(Cube())) + + +class SphereTest(ThreeDScene): + def construct(self): + self.play(Animation(Sphere())) + + +class AxesTest(ThreeDScene): + def construct(self): + self.play(Animation(ThreeDAxes())) + + +class CameraMoveTest(ThreeDScene): + def construct(self): + cube = Cube() + self.play(Animation(cube)) + self.move_camera(phi=PI/4, theta=PI/4) + + +class AmbientCameraMoveTest(ThreeDScene): + def construct(self): + cube = Cube() + self.begin_ambient_camera_rotation(rate=0.5) + self.play(Animation(cube)) + + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "threed") diff --git a/tests/test_transform.py b/tests/test_transform.py new file mode 100644 index 0000000000..c19df2f146 --- /dev/null +++ b/tests/test_transform.py @@ -0,0 +1,123 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +class TransformTest(Scene): + def construct(self): + square = Square() + circle = Circle() + self.play(Transform(square, circle)) + + +class TransformFromCopyTest(Scene): + def construct(self): + square = Square() + circle = Circle() + self.play(TransformFromCopy(square, circle)) + + +class ClockwiseTransformTest(Scene): + def construct(self): + square = Square() + circle = Circle() + self.play(ClockwiseTransform(square, circle)) + + +class CounterclockwiseTransformTest(Scene): + def construct(self): + square = Square() + circle = Circle() + self.play(CounterclockwiseTransform(square, circle)) + + +class MoveToTargetTest(Scene): + def construct(self): + square = Square() + square.generate_target() + square.target.shift(3*UP) + self.play(MoveToTarget(square)) + + +class ApplyPointwiseFunctionTest(Scene): + def construct(self): + square = Square() + def func(p): + return np.array([1.0, 1.0, 0.0]) + self.play( + ApplyPointwiseFunction(func, square) + ) + + +class FadeToColortTest(Scene): + def construct(self): + square = Square() + self.play(FadeToColor(square, RED)) + + +class ScaleInPlaceTest(Scene): + def construct(self): + square = Square() + self.play(ScaleInPlace(square, scale_factor=0.1)) + + +class ShrinkToCenterTest(Scene): + def construct(self): + square = Square() + self.play(ShrinkToCenter(square)) + + +class RestoreTest(Scene): + def construct(self): + square = Square() + circle = Circle() + self.play(Transform(square, circle)) + square.save_state() + self.play(square.shift, UP) + self.play(Restore(square)) + + +class ApplyFunctionTest(Scene): + def construct(self): + square = Square() + self.add(square) + def apply_function(mob): + mob.scale(2) + mob.to_corner(UR) + mob.rotate(PI/4) + mob.set_color(RED) + return mob + self.play( + ApplyFunction( + apply_function, + square + ) + ) + + +class ApplyComplexFunctionTest(Scene): + def construct(self): + square = Square() + self.play( + ApplyComplexFunction( + lambda complex_num: complex_num + 2 * np.complex(0, 1), square + ) + ) + + +class ApplyMatrixTest(Scene): + def construct(self): + square = Square() + matrice = [[1.0, 0.5], [1.0, 0.0]] + self.play(ApplyMatrix(matrice, square)) + + +class CyclicReplaceTest(Scene): + def construct(self): + square = Square() + circle = Circle() + circle.shift(3 * UP) + self.play(CyclicReplace(square, circle)) + + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "transform") \ No newline at end of file diff --git a/tests/test_updaters.py b/tests/test_updaters.py new file mode 100644 index 0000000000..bd8d2badc5 --- /dev/null +++ b/tests/test_updaters.py @@ -0,0 +1,25 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +class UpdaterTest(Scene): + def construct(self): + dot = Dot() + square = Square() + self.add(dot, square) + square.add_updater(lambda m: m.next_to(dot, RIGHT, buff=SMALL_BUFF)) + self.add(square) + self.play(dot.shift, UP*2) + square.clear_updaters() + + +class ValueTrackerTest(Scene): + def construct(self): + theta = ValueTracker(PI/2) + line_1 = Line(ORIGIN, RIGHT*3, color=RED) + line_2 = Line(ORIGIN, RIGHT*3, color=GREEN) + line_2.rotate(theta.get_value(), about_point=ORIGIN) + + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "updaters") \ No newline at end of file diff --git a/tests/test_writing.py b/tests/test_writing.py new file mode 100644 index 0000000000..2b53a7059e --- /dev/null +++ b/tests/test_writing.py @@ -0,0 +1,36 @@ +from manim import * +from testing_utils import utils_test_scenes, get_scenes_to_test + + +#NOTE : All of these tests use cached data (in /test_cache) +# Cache functionality is tested within test_CLI. + +class TextTest(Scene): + def construct(self): + t = Text('testing', font = "Arial") + self.play(Animation(t)) + + +class TextMobjectTest(Scene): + def construct(self): + constants.TEX_TEMPLATE = TexTemplate() + t = TextMobject('Hello world !') + self.play(Animation(t)) + + +class TexMobjectTest(Scene): + def construct(self): + #IMPORTANT NOTE : This won't test the abitilty of manim to write/cache latex. + # i.e It will pass even if latex is not installed. + # This is due to the fact that the latex used here has been cached (see test_cache directory) + constants.TEX_TEMPLATE = TexTemplate() + t = TexMobject( + "\\sum_{n=1}^\\infty " + "\\frac{1}{n^2} = \\frac{\\pi^2}{6}" + ) + self.play(Animation(t)) + + + +def test_scenes(get_config_test): + utils_test_scenes(get_scenes_to_test(__name__), get_config_test, "writing", caching_needed=True) diff --git a/tests/testing_utils.py b/tests/testing_utils.py new file mode 100644 index 0000000000..a5b668d59b --- /dev/null +++ b/tests/testing_utils.py @@ -0,0 +1,151 @@ +import numpy as np +import os +import sys +import inspect +import logging +import pytest + +from manim import logger +from manim import dirs +from manim import config + + +class SceneTester: + """Class used to test the animations. + + Parameters + ---------- + scene_object : :class:`~.Scene` + The scene to be tested + config_scene : :class:`dict` + The configuration of the scene + module_tested : :class:`str` + The name of the module tested. i.e if we are testing functions of creation.py, the module will be "creation" + + Attributes + ----------- + path_tests_medias_cache : : class:`str` + Path to 'media' folder generated by manim. This folder contains cached data used by some tests. + path_tests_data : : class:`str` + Path to the data used for the tests (i.e the pre-rendered frames). + scene : :class:`Scene` + The scene 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_cache = os.path.join( + 'tests', 'tests_cache', module_tested) + self.path_tests_data = os.path.join( + 'tests', 'tests_data', module_tested) + + tex_dir, text_dir = None, None + if caching_needed: + text_dir = os.path.join( + self.path_tests_medias_cache, scene_object.__name__, 'Text') + tex_dir = os.path.join(self.path_tests_medias_cache, + 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) + # By invoking this, the scene is rendered. + self.scene = scene_object(**config_scene) + + def load_data(self): + """Load the np.array of the last frame of a pre-rendered scene. If not found, throw FileNotFoundError. + + Returns + ------- + :class:`numpy.array` + The pre-rendered frame. + """ + with pytest.raises(FileNotFoundError) as e_info: + data_loaded = np.load(os.path.join( + self.path_tests_data, "{}.npy".format(str(self.scene)))) + raise FileNotFoundError('test_data not found !') + assert (str(e_info.value) == + 'test_data not found !'), f"{str(self.scene).replace('Test', '')} does not seem have a pre-rendered frame for testing, or it has not been found." + return data_loaded + + def test(self): + """ Core of the test. Will compare the pre-rendered frame (get with load_data()) with the frame rendered during the test (get with scene.get_frame())""" + test_result = np.array_equal(self.scene.get_frame(), self.load_data()) + assert( + test_result), f"The frames don't match. {str(self.scene).replace('Test', '')} has been modified. Please ignore if it was intended" + + +def get_scenes_to_test(module_name): + """Get all Test classes of the module from which it is called. Used to fetch all the SceneTest of the module. + + Parameters + ---------- + module_name : :class:`str` + The name of the module tested. + + Returns + ------- + :class:`list` + The list of all the classes of the module. + """ + return inspect.getmembers(sys.modules[module_name], lambda m: inspect.isclass(m) and m.__module__ == module_name) + + +def utils_test_scenes(scenes_to_test, CONFIG, module_name, caching_needed=False): + for _, scene_tested in scenes_to_test: + SceneTester(scene_tested, CONFIG, module_name, + caching_needed=caching_needed).test() + + +def set_test_scene(scene_object, module_name): + """Function used to set up the test data for a new feature. This will basically set up a pre-rendered frame for a scene. This is meant to be used only + when setting up tests. Please refer to the wiki. + + Parameters + ---------- + scene_object : :class:`~.Scene` + The scene with wich we want to set up a new test. + module_name : :class:`str` + The name of the module in which the functionnality tested is contained. For example, 'Write' is contained in the module 'creation'. This will be used in the folder architecture + of '/tests_data'. + + Examples + -------- + Normal usage:: + set_test_scene(DotTest, "geometry") + """ + + 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) + data = scene.get_frame() + path = os.path.join("manim", "tests", "tests_data", + "{}".format(module_name)) + if not os.path.isdir(path): + os.makedirs(path) + np.save(os.path.join(path, str(scene)), data) + logger.info('Test data saved in ' + path + '\n') diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.aux b/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.dvi new file mode 100644 index 0000000000..bfd7265312 Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.svg b/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.svg new file mode 100644 index 0000000000..260887c83a --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.tex b/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.tex new file mode 100644 index 0000000000..6314f26a72 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/3623b72242f36fa9.tex @@ -0,0 +1,8 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\centering $y$ + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.aux b/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.dvi new file mode 100644 index 0000000000..afb06d32b8 Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.svg b/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.svg new file mode 100644 index 0000000000..d177e3864f --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.tex b/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.tex new file mode 100644 index 0000000000..333c5610b1 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/4c165d8733e6b394.tex @@ -0,0 +1,8 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +$y$ + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.aux b/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.dvi new file mode 100644 index 0000000000..c0b10377fa Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.svg b/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.svg new file mode 100644 index 0000000000..6f9673807e --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.tex b/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.tex new file mode 100644 index 0000000000..3313377334 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/5b246d8c932af71a.tex @@ -0,0 +1,10 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\begin{align*} +6 +\end{align*} + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.aux b/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.dvi new file mode 100644 index 0000000000..fa85fc38ce Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.svg b/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.svg new file mode 100644 index 0000000000..ca53800f47 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.tex b/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.tex new file mode 100644 index 0000000000..454c71f5ef --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/62daeedc9e87677e.tex @@ -0,0 +1,10 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\begin{align*} +4 +\end{align*} + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.aux b/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.dvi new file mode 100644 index 0000000000..6645c432e7 Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.svg b/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.svg new file mode 100644 index 0000000000..f179d229a9 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.tex b/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.tex new file mode 100644 index 0000000000..533775924a --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/66150e0224a73e5f.tex @@ -0,0 +1,10 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\begin{align*} +- +\end{align*} + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.aux b/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.dvi new file mode 100644 index 0000000000..2f941cd4e4 Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.svg b/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.svg new file mode 100644 index 0000000000..7ccce63068 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.tex b/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.tex new file mode 100644 index 0000000000..e76c2410b1 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/6896c368b863add8.tex @@ -0,0 +1,10 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\begin{align*} +1 +\end{align*} + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.aux b/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.dvi new file mode 100644 index 0000000000..8302b9e8ed Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.svg b/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.svg new file mode 100644 index 0000000000..d667ac079b --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.tex b/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.tex new file mode 100644 index 0000000000..b638b4c620 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/7399563bee7ad4e5.tex @@ -0,0 +1,10 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\begin{align*} +2 +\end{align*} + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.aux b/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.dvi new file mode 100644 index 0000000000..38c4ac686e Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.svg b/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.svg new file mode 100644 index 0000000000..d52f01943f --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.tex b/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.tex new file mode 100644 index 0000000000..04ec34a57d --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/89a469c6726623e3.tex @@ -0,0 +1,10 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\begin{align*} +0 +\end{align*} + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.aux b/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.dvi new file mode 100644 index 0000000000..41e6b9aad5 Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.svg b/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.svg new file mode 100644 index 0000000000..e93171b7e8 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.tex b/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.tex new file mode 100644 index 0000000000..5887b3a5f0 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/9f4cc7daf5892d94.tex @@ -0,0 +1,8 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +$x$ + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.aux b/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.dvi new file mode 100644 index 0000000000..ba89e85079 Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.svg b/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.svg new file mode 100644 index 0000000000..0bf687c3e1 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.tex b/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.tex new file mode 100644 index 0000000000..1803ea0d92 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/cc5e695bd773416a.tex @@ -0,0 +1,8 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\centering $x$ + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.aux b/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.aux new file mode 100644 index 0000000000..64ae5c5e43 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.aux @@ -0,0 +1,3 @@ +\relax +\providecommand\babel@aux[2]{} +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.dvi b/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.dvi new file mode 100644 index 0000000000..36fb2af78f Binary files /dev/null and b/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.dvi differ diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.svg b/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.svg new file mode 100644 index 0000000000..c4e01206aa --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.svg @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.tex b/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.tex new file mode 100644 index 0000000000..30f7389e15 --- /dev/null +++ b/tests/tests_cache/graph/PlotFunctions/Tex/e4a76237723951d2.tex @@ -0,0 +1,10 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\begin{align*} +8 +\end{align*} + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.aux b/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.aux new file mode 100644 index 0000000000..9c28a69b61 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.aux @@ -0,0 +1,2 @@ +\relax +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.dvi b/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.dvi new file mode 100644 index 0000000000..c21b9495b4 Binary files /dev/null and b/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.dvi differ diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.svg b/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.svg new file mode 100644 index 0000000000..e201978919 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.tex b/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.tex new file mode 100644 index 0000000000..5edbddbb39 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/77b5098a5fb87c1b.tex @@ -0,0 +1,30 @@ +\documentclass[preview]{standalone} + +\usepackage[english]{babel} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{dsfont} +\usepackage{setspace} +\usepackage{tipa} +\usepackage{relsize} +\usepackage{textcomp} +\usepackage{mathrsfs} +\usepackage{calligra} +\usepackage{wasysym} +\usepackage{ragged2e} +\usepackage{physics} +\usepackage{xcolor} +\usepackage{microtype} +\DisableLigatures{encoding = *, family = * } +%\usepackage[UTF8]{ctex} +\linespread{1} + +\begin{document} + +\begin{align*} +\sum_{n=1}^\infty \frac{1}{n^3} = \frac{\pi^2}{6} +\end{align*} + +\end{document} diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.aux b/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.aux new file mode 100644 index 0000000000..9c28a69b61 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.aux @@ -0,0 +1,2 @@ +\relax +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.dvi b/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.dvi new file mode 100644 index 0000000000..5c845b360c Binary files /dev/null and b/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.dvi differ diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.svg b/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.svg new file mode 100644 index 0000000000..bac9a91908 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.tex b/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.tex new file mode 100644 index 0000000000..278c85c5b7 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/cd02c6a47026b73d.tex @@ -0,0 +1,10 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\begin{align*} +\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6} +\end{align*} + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.aux b/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.aux new file mode 100644 index 0000000000..9c28a69b61 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.aux @@ -0,0 +1,2 @@ +\relax +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.dvi b/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.dvi new file mode 100644 index 0000000000..a137437893 Binary files /dev/null and b/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.dvi differ diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.svg b/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.svg new file mode 100644 index 0000000000..19b4350a92 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.tex b/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.tex new file mode 100644 index 0000000000..ddfad7bab1 --- /dev/null +++ b/tests/tests_cache/writing/TexMobjectTest/Tex/ebc532caee153e1a.tex @@ -0,0 +1,30 @@ +\documentclass[preview]{standalone} + +\usepackage[english]{babel} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{dsfont} +\usepackage{setspace} +\usepackage{tipa} +\usepackage{relsize} +\usepackage{textcomp} +\usepackage{mathrsfs} +\usepackage{calligra} +\usepackage{wasysym} +\usepackage{ragged2e} +\usepackage{physics} +\usepackage{xcolor} +\usepackage{microtype} +\DisableLigatures{encoding = *, family = * } +%\usepackage[UTF8]{ctex} +\linespread{1} + +\begin{document} + +\begin{align*} +\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6} +\end{align*} + +\end{document} diff --git a/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.aux b/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.aux new file mode 100644 index 0000000000..9c28a69b61 --- /dev/null +++ b/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.aux @@ -0,0 +1,2 @@ +\relax +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.dvi b/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.dvi new file mode 100644 index 0000000000..8366a80189 Binary files /dev/null and b/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.dvi differ diff --git a/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.svg b/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.svg new file mode 100644 index 0000000000..656deadbda --- /dev/null +++ b/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.tex b/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.tex new file mode 100644 index 0000000000..35e6d406ee --- /dev/null +++ b/tests/tests_cache/writing/TextMobjectTest/Tex/c8dd851bb4f17024.tex @@ -0,0 +1,8 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +Hello world ! + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.aux b/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.aux new file mode 100644 index 0000000000..9c28a69b61 --- /dev/null +++ b/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.aux @@ -0,0 +1,2 @@ +\relax +\@nameuse{bbl@beforestart} diff --git a/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.dvi b/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.dvi new file mode 100644 index 0000000000..c14f92ef60 Binary files /dev/null and b/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.dvi differ diff --git a/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.svg b/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.svg new file mode 100644 index 0000000000..d2b476e25d --- /dev/null +++ b/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.tex b/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.tex new file mode 100644 index 0000000000..1c5d7f4aab --- /dev/null +++ b/tests/tests_cache/writing/TextMobjectTest/Tex/c93e3abf7cf78db1.tex @@ -0,0 +1,8 @@ +\documentclass[preview]{standalone}\usepackage[english]{babel}\usepackage{amsmath}\usepackage{amssymb}\usepackage{dsfont}\usepackage{setspace}\usepackage{tipa}\usepackage{relsize}\usepackage{textcomp}\usepackage{mathrsfs}\usepackage{calligra}\usepackage{wasysym}\usepackage{ragged2e}\usepackage{physics}\usepackage{xcolor}\usepackage{microtype}\linespread{1} +\DisableLigatures{encoding = *, family = *} + +\begin{document} + +\centering Hello world ! + +\end{document} \ No newline at end of file diff --git a/tests/tests_cache/writing/TextTest/Text/1d47a07ea0ff0ea8.svg b/tests/tests_cache/writing/TextTest/Text/1d47a07ea0ff0ea8.svg new file mode 100644 index 0000000000..ab8ad5aeee --- /dev/null +++ b/tests/tests_cache/writing/TextTest/Text/1d47a07ea0ff0ea8.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests_cache/writing/TextTest/Text/770a265b40ff9104.svg b/tests/tests_cache/writing/TextTest/Text/770a265b40ff9104.svg new file mode 100644 index 0000000000..6f88fbda01 --- /dev/null +++ b/tests/tests_cache/writing/TextTest/Text/770a265b40ff9104.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests_cache/writing/TextTest/Text/f3605000a86a4a1c.svg b/tests/tests_cache/writing/TextTest/Text/f3605000a86a4a1c.svg new file mode 100644 index 0000000000..2c1bc2a9be --- /dev/null +++ b/tests/tests_cache/writing/TextTest/Text/f3605000a86a4a1c.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests_cache/writing/TextTest/Text/fdc1d31b6ce03692.svg b/tests/tests_cache/writing/TextTest/Text/fdc1d31b6ce03692.svg new file mode 100644 index 0000000000..d8c7692ae6 --- /dev/null +++ b/tests/tests_cache/writing/TextTest/Text/fdc1d31b6ce03692.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests_cache/writing/TextTest/Text/space.svg b/tests/tests_cache/writing/TextTest/Text/space.svg new file mode 100644 index 0000000000..4de22d4edd --- /dev/null +++ b/tests/tests_cache/writing/TextTest/Text/space.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/tests_data/basic_scenes.py b/tests/tests_data/basic_scenes.py new file mode 100644 index 0000000000..b0f6b1f93a --- /dev/null +++ b/tests/tests_data/basic_scenes.py @@ -0,0 +1,30 @@ +from manim import * + +# This module is used in the CLI tests in tests_CLi.py. + +class SquareToCircle(Scene): + def construct(self): + circle = Circle() + square = Square() + square.flip(RIGHT) + square.rotate(-3 * TAU / 8) + circle.set_fill(PINK, opacity=0.5) + + self.play(ShowCreation(square)) + self.play(Transform(square, circle)) + self.play(FadeOut(square)) + +class WriteStuff(Scene): + def construct(self): + example_text = TextMobject( + "This is a some text", + tex_to_color_map={"text": YELLOW} + ) + example_tex = TexMobject( + "\\sum_{k=1}^\\infty {1 \\over k^2} = {\\pi^2 \\over 6}", + ) + group = VGroup(example_text, example_tex) + group.arrange(DOWN) + group.set_width(FRAME_WIDTH - 2 * LARGE_BUFF) + + self.play(Write(example_text)) diff --git a/tests/tests_data/creation/DrawBorderThenFillTest.npy b/tests/tests_data/creation/DrawBorderThenFillTest.npy new file mode 100644 index 0000000000..ccfc7f8aa1 Binary files /dev/null and b/tests/tests_data/creation/DrawBorderThenFillTest.npy differ diff --git a/tests/tests_data/creation/FadeInFromDownTest.npy b/tests/tests_data/creation/FadeInFromDownTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/FadeInFromDownTest.npy differ diff --git a/tests/tests_data/creation/FadeInFromLargeTest.npy b/tests/tests_data/creation/FadeInFromLargeTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/FadeInFromLargeTest.npy differ diff --git a/tests/tests_data/creation/FadeInFromTest.npy b/tests/tests_data/creation/FadeInFromTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/FadeInFromTest.npy differ diff --git a/tests/tests_data/creation/FadeInTest.npy b/tests/tests_data/creation/FadeInTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/FadeInTest.npy differ diff --git a/tests/tests_data/creation/FadeOutAndShiftTest.npy b/tests/tests_data/creation/FadeOutAndShiftTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/creation/FadeOutAndShiftTest.npy differ diff --git a/tests/tests_data/creation/FadeOutTest.npy b/tests/tests_data/creation/FadeOutTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/creation/FadeOutTest.npy differ diff --git a/tests/tests_data/creation/GrowFromCenterTest.npy b/tests/tests_data/creation/GrowFromCenterTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/GrowFromCenterTest.npy differ diff --git a/tests/tests_data/creation/GrowFromEdgeTest.npy b/tests/tests_data/creation/GrowFromEdgeTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/GrowFromEdgeTest.npy differ diff --git a/tests/tests_data/creation/GrowFromPointTest.npy b/tests/tests_data/creation/GrowFromPointTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/GrowFromPointTest.npy differ diff --git a/tests/tests_data/creation/ShowCreationTest.npy b/tests/tests_data/creation/ShowCreationTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/ShowCreationTest.npy differ diff --git a/tests/tests_data/creation/ShrinkToCenterTest.npy b/tests/tests_data/creation/ShrinkToCenterTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/creation/ShrinkToCenterTest.npy differ diff --git a/tests/tests_data/creation/SpinInFromNothingTest.npy b/tests/tests_data/creation/SpinInFromNothingTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/creation/SpinInFromNothingTest.npy differ diff --git a/tests/tests_data/creation/UncreateTest.npy b/tests/tests_data/creation/UncreateTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/creation/UncreateTest.npy differ diff --git a/tests/tests_data/creation/WriteTest.npy b/tests/tests_data/creation/WriteTest.npy new file mode 100644 index 0000000000..e835795e1f Binary files /dev/null and b/tests/tests_data/creation/WriteTest.npy differ diff --git a/tests/tests_data/geometry/AnnularSectorTest.npy b/tests/tests_data/geometry/AnnularSectorTest.npy new file mode 100644 index 0000000000..a15aa12443 Binary files /dev/null and b/tests/tests_data/geometry/AnnularSectorTest.npy differ diff --git a/tests/tests_data/geometry/AnnulusTest.npy b/tests/tests_data/geometry/AnnulusTest.npy new file mode 100644 index 0000000000..7cb120b272 Binary files /dev/null and b/tests/tests_data/geometry/AnnulusTest.npy differ diff --git a/tests/tests_data/geometry/ArcBetweenPointsTest.npy b/tests/tests_data/geometry/ArcBetweenPointsTest.npy new file mode 100644 index 0000000000..cc3ae52178 Binary files /dev/null and b/tests/tests_data/geometry/ArcBetweenPointsTest.npy differ diff --git a/tests/tests_data/geometry/ArcTest.npy b/tests/tests_data/geometry/ArcTest.npy new file mode 100644 index 0000000000..7541b40f30 Binary files /dev/null and b/tests/tests_data/geometry/ArcTest.npy differ diff --git a/tests/tests_data/geometry/CircleTest.npy b/tests/tests_data/geometry/CircleTest.npy new file mode 100644 index 0000000000..78f0f70f98 Binary files /dev/null and b/tests/tests_data/geometry/CircleTest.npy differ diff --git a/tests/tests_data/geometry/CoordinatesTest.npy b/tests/tests_data/geometry/CoordinatesTest.npy new file mode 100644 index 0000000000..b4632579e7 Binary files /dev/null and b/tests/tests_data/geometry/CoordinatesTest.npy differ diff --git a/tests/tests_data/geometry/CurvedArrowTest.npy b/tests/tests_data/geometry/CurvedArrowTest.npy new file mode 100644 index 0000000000..4ce7413722 Binary files /dev/null and b/tests/tests_data/geometry/CurvedArrowTest.npy differ diff --git a/tests/tests_data/geometry/DotTest.npy b/tests/tests_data/geometry/DotTest.npy new file mode 100644 index 0000000000..5151b856c2 Binary files /dev/null and b/tests/tests_data/geometry/DotTest.npy differ diff --git a/tests/tests_data/geometry/DoubleArrowTest.npy b/tests/tests_data/geometry/DoubleArrowTest.npy new file mode 100644 index 0000000000..05be3f1d7e Binary files /dev/null and b/tests/tests_data/geometry/DoubleArrowTest.npy differ diff --git a/tests/tests_data/geometry/Elbowtest.npy b/tests/tests_data/geometry/Elbowtest.npy new file mode 100644 index 0000000000..2fb455aa49 Binary files /dev/null and b/tests/tests_data/geometry/Elbowtest.npy differ diff --git a/tests/tests_data/geometry/EllipseTest.npy b/tests/tests_data/geometry/EllipseTest.npy new file mode 100644 index 0000000000..ad08e2d8b9 Binary files /dev/null and b/tests/tests_data/geometry/EllipseTest.npy differ diff --git a/tests/tests_data/geometry/LineTest.npy b/tests/tests_data/geometry/LineTest.npy new file mode 100644 index 0000000000..2dcd9b595d Binary files /dev/null and b/tests/tests_data/geometry/LineTest.npy differ diff --git a/tests/tests_data/geometry/PolygonTest.npy b/tests/tests_data/geometry/PolygonTest.npy new file mode 100644 index 0000000000..a7bb8e92c7 Binary files /dev/null and b/tests/tests_data/geometry/PolygonTest.npy differ diff --git a/tests/tests_data/geometry/RectangleTest.npy b/tests/tests_data/geometry/RectangleTest.npy new file mode 100644 index 0000000000..650779206a Binary files /dev/null and b/tests/tests_data/geometry/RectangleTest.npy differ diff --git a/tests/tests_data/geometry/RoundedRectangleTest.npy b/tests/tests_data/geometry/RoundedRectangleTest.npy new file mode 100644 index 0000000000..4c73433bf8 Binary files /dev/null and b/tests/tests_data/geometry/RoundedRectangleTest.npy differ diff --git a/tests/tests_data/geometry/SectorTest.npy b/tests/tests_data/geometry/SectorTest.npy new file mode 100644 index 0000000000..c5ea54e633 Binary files /dev/null and b/tests/tests_data/geometry/SectorTest.npy differ diff --git a/tests/tests_data/geometry/VectorTest.npy b/tests/tests_data/geometry/VectorTest.npy new file mode 100644 index 0000000000..70c3ab7eba Binary files /dev/null and b/tests/tests_data/geometry/VectorTest.npy differ diff --git a/tests/tests_data/graph/PlotFunctions.npy b/tests/tests_data/graph/PlotFunctions.npy new file mode 100644 index 0000000000..9b1079088a Binary files /dev/null and b/tests/tests_data/graph/PlotFunctions.npy differ diff --git a/tests/tests_data/indication/ApplyWaveTest.npy b/tests/tests_data/indication/ApplyWaveTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/indication/ApplyWaveTest.npy differ diff --git a/tests/tests_data/indication/CircleIndicateTest.npy b/tests/tests_data/indication/CircleIndicateTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/indication/CircleIndicateTest.npy differ diff --git a/tests/tests_data/indication/FlashTest.npy b/tests/tests_data/indication/FlashTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/indication/FlashTest.npy differ diff --git a/tests/tests_data/indication/FocusOnTest.npy b/tests/tests_data/indication/FocusOnTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/indication/FocusOnTest.npy differ diff --git a/tests/tests_data/indication/IndicateTest.npy b/tests/tests_data/indication/IndicateTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/indication/IndicateTest.npy differ diff --git a/tests/tests_data/indication/ShowCreationThenDestructionTest.npy b/tests/tests_data/indication/ShowCreationThenDestructionTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/indication/ShowCreationThenDestructionTest.npy differ diff --git a/tests/tests_data/indication/ShowCreationThenFadeOutTest.npy b/tests/tests_data/indication/ShowCreationThenFadeOutTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/indication/ShowCreationThenFadeOutTest.npy differ diff --git a/tests/tests_data/indication/ShowPassingFlashAroundTest.npy b/tests/tests_data/indication/ShowPassingFlashAroundTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/indication/ShowPassingFlashAroundTest.npy differ diff --git a/tests/tests_data/indication/ShowPassingFlashTest.npy b/tests/tests_data/indication/ShowPassingFlashTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/indication/ShowPassingFlashTest.npy differ diff --git a/tests/tests_data/indication/TurnInsideOutTest.npy b/tests/tests_data/indication/TurnInsideOutTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/indication/TurnInsideOutTest.npy differ diff --git a/tests/tests_data/indication/WiggleOutThenInTest.npy b/tests/tests_data/indication/WiggleOutThenInTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/indication/WiggleOutThenInTest.npy differ diff --git a/tests/tests_data/movements/HomotopyTest.npy b/tests/tests_data/movements/HomotopyTest.npy new file mode 100644 index 0000000000..60af6c7b6b Binary files /dev/null and b/tests/tests_data/movements/HomotopyTest.npy differ diff --git a/tests/tests_data/movements/MoveAlongPathTest.npy b/tests/tests_data/movements/MoveAlongPathTest.npy new file mode 100644 index 0000000000..a531aa13ba Binary files /dev/null and b/tests/tests_data/movements/MoveAlongPathTest.npy differ diff --git a/tests/tests_data/movements/MoveToTest.npy b/tests/tests_data/movements/MoveToTest.npy new file mode 100644 index 0000000000..4f22b1523e Binary files /dev/null and b/tests/tests_data/movements/MoveToTest.npy differ diff --git a/tests/tests_data/movements/PhaseFlowTest.npy b/tests/tests_data/movements/PhaseFlowTest.npy new file mode 100644 index 0000000000..cbc3eb5974 Binary files /dev/null and b/tests/tests_data/movements/PhaseFlowTest.npy differ diff --git a/tests/tests_data/movements/RotateTest.npy b/tests/tests_data/movements/RotateTest.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/movements/RotateTest.npy differ diff --git a/tests/tests_data/movements/ShiftTest.npy b/tests/tests_data/movements/ShiftTest.npy new file mode 100644 index 0000000000..67bb448cb9 Binary files /dev/null and b/tests/tests_data/movements/ShiftTest.npy differ diff --git a/tests/tests_data/sample_scenes/BasicScene.npy b/tests/tests_data/sample_scenes/BasicScene.npy new file mode 100644 index 0000000000..2d2fb7cc2a Binary files /dev/null and b/tests/tests_data/sample_scenes/BasicScene.npy differ diff --git a/tests/tests_data/sample_scenes/BasicTex.npy b/tests/tests_data/sample_scenes/BasicTex.npy new file mode 100644 index 0000000000..188dd5e2d4 Binary files /dev/null and b/tests/tests_data/sample_scenes/BasicTex.npy differ diff --git a/tests/tests_data/sample_scenes/GeometryScene.npy b/tests/tests_data/sample_scenes/GeometryScene.npy new file mode 100644 index 0000000000..1f0353683a Binary files /dev/null and b/tests/tests_data/sample_scenes/GeometryScene.npy differ diff --git a/tests/tests_data/threed/AmbientCameraMoveTest.npy b/tests/tests_data/threed/AmbientCameraMoveTest.npy new file mode 100644 index 0000000000..001d7c56fa Binary files /dev/null and b/tests/tests_data/threed/AmbientCameraMoveTest.npy differ diff --git a/tests/tests_data/threed/AxesTest.npy b/tests/tests_data/threed/AxesTest.npy new file mode 100644 index 0000000000..0cb1f4e3e8 Binary files /dev/null and b/tests/tests_data/threed/AxesTest.npy differ diff --git a/tests/tests_data/threed/CameraMoveTest.npy b/tests/tests_data/threed/CameraMoveTest.npy new file mode 100644 index 0000000000..515e608e07 Binary files /dev/null and b/tests/tests_data/threed/CameraMoveTest.npy differ diff --git a/tests/tests_data/threed/CubeTest.npy b/tests/tests_data/threed/CubeTest.npy new file mode 100644 index 0000000000..31df75ae63 Binary files /dev/null and b/tests/tests_data/threed/CubeTest.npy differ diff --git a/tests/tests_data/threed/SphereTest.npy b/tests/tests_data/threed/SphereTest.npy new file mode 100644 index 0000000000..afb6a1d984 Binary files /dev/null and b/tests/tests_data/threed/SphereTest.npy differ diff --git a/tests/tests_data/transform/ApplyComplexFunctionTest.npy b/tests/tests_data/transform/ApplyComplexFunctionTest.npy new file mode 100644 index 0000000000..ebd7959608 Binary files /dev/null and b/tests/tests_data/transform/ApplyComplexFunctionTest.npy differ diff --git a/tests/tests_data/transform/ApplyFunctionTest.npy b/tests/tests_data/transform/ApplyFunctionTest.npy new file mode 100644 index 0000000000..a22156c7dc Binary files /dev/null and b/tests/tests_data/transform/ApplyFunctionTest.npy differ diff --git a/tests/tests_data/transform/ApplyMatrixTest.npy b/tests/tests_data/transform/ApplyMatrixTest.npy new file mode 100644 index 0000000000..e3f12518a8 Binary files /dev/null and b/tests/tests_data/transform/ApplyMatrixTest.npy differ diff --git a/tests/tests_data/transform/ApplyPointwiseFunctionTest.npy b/tests/tests_data/transform/ApplyPointwiseFunctionTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/transform/ApplyPointwiseFunctionTest.npy differ diff --git a/tests/tests_data/transform/ClockwiseTransformTest.npy b/tests/tests_data/transform/ClockwiseTransformTest.npy new file mode 100644 index 0000000000..78f0f70f98 Binary files /dev/null and b/tests/tests_data/transform/ClockwiseTransformTest.npy differ diff --git a/tests/tests_data/transform/CounterclockwiseTransformTest.npy b/tests/tests_data/transform/CounterclockwiseTransformTest.npy new file mode 100644 index 0000000000..78f0f70f98 Binary files /dev/null and b/tests/tests_data/transform/CounterclockwiseTransformTest.npy differ diff --git a/tests/tests_data/transform/CyclicReplaceTest.npy b/tests/tests_data/transform/CyclicReplaceTest.npy new file mode 100644 index 0000000000..0cab724b1b Binary files /dev/null and b/tests/tests_data/transform/CyclicReplaceTest.npy differ diff --git a/tests/tests_data/transform/FadeToColortTest.npy b/tests/tests_data/transform/FadeToColortTest.npy new file mode 100644 index 0000000000..f303647c02 Binary files /dev/null and b/tests/tests_data/transform/FadeToColortTest.npy differ diff --git a/tests/tests_data/transform/MoveToTargetTest.npy b/tests/tests_data/transform/MoveToTargetTest.npy new file mode 100644 index 0000000000..e16b35b0a5 Binary files /dev/null and b/tests/tests_data/transform/MoveToTargetTest.npy differ diff --git a/tests/tests_data/transform/RestoreTest.npy b/tests/tests_data/transform/RestoreTest.npy new file mode 100644 index 0000000000..78f0f70f98 Binary files /dev/null and b/tests/tests_data/transform/RestoreTest.npy differ diff --git a/tests/tests_data/transform/ScaleInPlaceTest.npy b/tests/tests_data/transform/ScaleInPlaceTest.npy new file mode 100644 index 0000000000..50da222f5c Binary files /dev/null and b/tests/tests_data/transform/ScaleInPlaceTest.npy differ diff --git a/tests/tests_data/transform/ShrinkToCenterTest.npy b/tests/tests_data/transform/ShrinkToCenterTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/transform/ShrinkToCenterTest.npy differ diff --git a/tests/tests_data/transform/TransformFromCopyTest.npy b/tests/tests_data/transform/TransformFromCopyTest.npy new file mode 100644 index 0000000000..78f0f70f98 Binary files /dev/null and b/tests/tests_data/transform/TransformFromCopyTest.npy differ diff --git a/tests/tests_data/transform/TransformTest.npy b/tests/tests_data/transform/TransformTest.npy new file mode 100644 index 0000000000..78f0f70f98 Binary files /dev/null and b/tests/tests_data/transform/TransformTest.npy differ diff --git a/tests/tests_data/updaters/UpdaterTest.npy b/tests/tests_data/updaters/UpdaterTest.npy new file mode 100644 index 0000000000..b0b48565c5 Binary files /dev/null and b/tests/tests_data/updaters/UpdaterTest.npy differ diff --git a/tests/tests_data/updaters/ValueTrackerTest.npy b/tests/tests_data/updaters/ValueTrackerTest.npy new file mode 100644 index 0000000000..de3abcab7b Binary files /dev/null and b/tests/tests_data/updaters/ValueTrackerTest.npy differ diff --git a/tests/tests_data/writing/TexMobjectTest.npy b/tests/tests_data/writing/TexMobjectTest.npy new file mode 100644 index 0000000000..83cde8237d Binary files /dev/null and b/tests/tests_data/writing/TexMobjectTest.npy differ diff --git a/tests/tests_data/writing/TextMobjectTest.npy b/tests/tests_data/writing/TextMobjectTest.npy new file mode 100644 index 0000000000..9f85ae15c7 Binary files /dev/null and b/tests/tests_data/writing/TextMobjectTest.npy differ diff --git a/tests/tests_data/writing/TextTest.npy b/tests/tests_data/writing/TextTest.npy new file mode 100644 index 0000000000..b3e2559e23 Binary files /dev/null and b/tests/tests_data/writing/TextTest.npy differ