Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Converted all the graphical tests to the new syntax (Tests PR 3/3). (#1836)

Hugues Devimeuxb46b860e97f5
diff --git a/tests/control_data/graphical_units_data/brace/ArcBraceTest.npz b/tests/control_data/graphical_units_data/brace/ArcBraceTest.npz
deleted file mode 100644
index 19661bb34..000000000
Binary files a/tests/control_data/graphical_units_data/brace/ArcBraceTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/brace/BraceSharpnessTest.npz b/tests/control_data/graphical_units_data/brace/BraceSharpnessTest.npz
deleted file mode 100644
index d6e4740b1..000000000
Binary files a/tests/control_data/graphical_units_data/brace/BraceSharpnessTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/brace/BraceTipTest.npz b/tests/control_data/graphical_units_data/brace/BraceTipTest.npz
deleted file mode 100644
index f9d3ea113..000000000
Binary files a/tests/control_data/graphical_units_data/brace/BraceTipTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/brace/arcBrace.npz b/tests/control_data/graphical_units_data/brace/arcBrace.npz
new file mode 100644
index 000000000..8fd91fd1b
Binary files /dev/null and b/tests/control_data/graphical_units_data/brace/arcBrace.npz differ
diff --git a/tests/control_data/graphical_units_data/brace/braceTip.npz b/tests/control_data/graphical_units_data/brace/braceTip.npz
new file mode 100644
index 000000000..d9018a2e0
Binary files /dev/null and b/tests/control_data/graphical_units_data/brace/braceTip.npz differ
diff --git a/tests/control_data/graphical_units_data/brace/brace_sharpness.npz b/tests/control_data/graphical_units_data/brace/brace_sharpness.npz
new file mode 100644
index 000000000..59231e0dd
Binary files /dev/null and b/tests/control_data/graphical_units_data/brace/brace_sharpness.npz differ
diff --git a/tests/control_data/graphical_units_data/coordinate_system/number_plane.npz b/tests/control_data/graphical_units_data/coordinate_system/number_plane.npz
new file mode 100644
index 000000000..2653e3ccf
Binary files /dev/null and b/tests/control_data/graphical_units_data/coordinate_system/number_plane.npz differ
diff --git a/tests/control_data/graphical_units_data/coordinate_systems/NumberPlaneTest.npz b/tests/control_data/graphical_units_data/coordinate_systems/NumberPlaneTest.npz
deleted file mode 100644
index c9608f3ed..000000000
Binary files a/tests/control_data/graphical_units_data/coordinate_systems/NumberPlaneTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/CreateTest.npz b/tests/control_data/graphical_units_data/creation/CreateTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/creation/CreateTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/DrawBorderThenFill.npz b/tests/control_data/graphical_units_data/creation/DrawBorderThenFill.npz
new file mode 100644
index 000000000..3d74bcadf
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/DrawBorderThenFill.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/DrawBorderThenFillTest.npz b/tests/control_data/graphical_units_data/creation/DrawBorderThenFillTest.npz
deleted file mode 100644
index 3cb5150ef..000000000
Binary files a/tests/control_data/graphical_units_data/creation/DrawBorderThenFillTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeIn.npz b/tests/control_data/graphical_units_data/creation/FadeIn.npz
new file mode 100644
index 000000000..fb6bf6a2b
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/FadeIn.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeInFromLargeTest.npz b/tests/control_data/graphical_units_data/creation/FadeInFromLargeTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeInFromLargeTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeInFromTest.npz b/tests/control_data/graphical_units_data/creation/FadeInFromTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeInFromTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeInTest.npz b/tests/control_data/graphical_units_data/creation/FadeInTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/creation/FadeInTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeOut.npz b/tests/control_data/graphical_units_data/creation/FadeOut.npz
new file mode 100644
index 000000000..299e80d1b
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/FadeOut.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromCenter.npz b/tests/control_data/graphical_units_data/creation/GrowFromCenter.npz
new file mode 100644
index 000000000..b6fc1bbc4
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/GrowFromCenter.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromCenterTest.npz b/tests/control_data/graphical_units_data/creation/GrowFromCenterTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/creation/GrowFromCenterTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromEdge.npz b/tests/control_data/graphical_units_data/creation/GrowFromEdge.npz
new file mode 100644
index 000000000..601dd9cc4
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/GrowFromEdge.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromEdgeTest.npz b/tests/control_data/graphical_units_data/creation/GrowFromEdgeTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/creation/GrowFromEdgeTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromPoint.npz b/tests/control_data/graphical_units_data/creation/GrowFromPoint.npz
new file mode 100644
index 000000000..5e8f653e6
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/GrowFromPoint.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/GrowFromPointTest.npz b/tests/control_data/graphical_units_data/creation/GrowFromPointTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/creation/GrowFromPointTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/ShrinkToCenter.npz b/tests/control_data/graphical_units_data/creation/ShrinkToCenter.npz
new file mode 100644
index 000000000..1deac9bfa
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/ShrinkToCenter.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/SpinInFromNothing.npz b/tests/control_data/graphical_units_data/creation/SpinInFromNothing.npz
new file mode 100644
index 000000000..8aa8612e2
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/SpinInFromNothing.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/SpinInFromNothingTest.npz b/tests/control_data/graphical_units_data/creation/SpinInFromNothingTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/creation/SpinInFromNothingTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/WriteTest.npz b/tests/control_data/graphical_units_data/creation/WriteTest.npz
deleted file mode 100644
index 6e81913d0..000000000
Binary files a/tests/control_data/graphical_units_data/creation/WriteTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/create.npz b/tests/control_data/graphical_units_data/creation/create.npz
new file mode 100644
index 000000000..39e988076
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/create.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/uncreate.npz b/tests/control_data/graphical_units_data/creation/uncreate.npz
new file mode 100644
index 000000000..2b2113118
Binary files /dev/null and b/tests/control_data/graphical_units_data/creation/uncreate.npz differ
diff --git a/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.aux b/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.aux
deleted file mode 100644
index f23e54680..000000000
--- a/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax
diff --git a/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.dvi b/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.dvi
deleted file mode 100644
index 55efb62a0..000000000
Binary files a/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.dvi and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.svg b/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.svg
deleted file mode 100644
index 4f218a73a..000000000
--- a/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- This file was generated by dvisvgm 2.1.3 -->
-<svg height='6.9185pt' version='1.1' viewBox='161.597 -6.9185 20.5181 6.9185' width='20.5181pt' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
-<defs>
-<path d='M3.71606 -3.76588C3.53674 -4.1345 3.24782 -4.40349 2.7995 -4.40349C1.63387 -4.40349 0.398506 -2.93898 0.398506 -1.48443C0.398506 -0.547945 0.946451 0.109589 1.72354 0.109589C1.92279 0.109589 2.42092 0.0697385 3.01868 -0.637609C3.09838 -0.219178 3.44707 0.109589 3.92528 0.109589C4.27397 0.109589 4.50311 -0.119552 4.66252 -0.438356C4.83188 -0.797011 4.96139 -1.40473 4.96139 -1.42466C4.96139 -1.52428 4.87173 -1.52428 4.84184 -1.52428C4.74222 -1.52428 4.73225 -1.48443 4.70237 -1.34496C4.533 -0.697385 4.35367 -0.109589 3.94521 -0.109589C3.67621 -0.109589 3.64633 -0.368618 3.64633 -0.56787C3.64633 -0.787049 3.66625 -0.86675 3.77584 -1.30511C3.88543 -1.72354 3.90535 -1.82316 3.99502 -2.20174L4.35367 -3.59651C4.42341 -3.87547 4.42341 -3.89539 4.42341 -3.93524C4.42341 -4.10461 4.30386 -4.20423 4.1345 -4.20423C3.89539 -4.20423 3.74595 -3.98506 3.71606 -3.76588ZM3.06849 -1.18555C3.01868 -1.00623 3.01868 -0.986301 2.86924 -0.816936C2.43088 -0.268991 2.02242 -0.109589 1.74346 -0.109589C1.24533 -0.109589 1.10585 -0.657534 1.10585 -1.04608C1.10585 -1.54421 1.42466 -2.76961 1.6538 -3.2279C1.96264 -3.81569 2.41096 -4.18431 2.80946 -4.18431C3.45704 -4.18431 3.59651 -3.36737 3.59651 -3.3076S3.57659 -3.18804 3.56663 -3.13823L3.06849 -1.18555Z' id='g0-97'/>
-<path d='M2.38107 -6.80448C2.38107 -6.81445 2.38107 -6.91407 2.25156 -6.91407C2.02242 -6.91407 1.29514 -6.83437 1.03611 -6.81445C0.956413 -6.80448 0.846824 -6.79452 0.846824 -6.61519C0.846824 -6.49564 0.936488 -6.49564 1.08593 -6.49564C1.56413 -6.49564 1.58406 -6.4259 1.58406 -6.32628C1.58406 -6.25654 1.4944 -5.91781 1.44458 -5.70859L0.627646 -2.46077C0.508095 -1.96264 0.468244 -1.80324 0.468244 -1.45455C0.468244 -0.508095 0.996264 0.109589 1.7335 0.109589C2.90909 0.109589 4.1345 -1.37484 4.1345 -2.80946C4.1345 -3.71606 3.60648 -4.40349 2.80946 -4.40349C2.35118 -4.40349 1.94271 -4.11457 1.64384 -3.80573L2.38107 -6.80448ZM1.44458 -3.03861C1.50436 -3.25778 1.50436 -3.27771 1.59402 -3.3873C2.08219 -4.03487 2.53051 -4.18431 2.78954 -4.18431C3.14819 -4.18431 3.41719 -3.88543 3.41719 -3.24782C3.41719 -2.66002 3.08842 -1.51432 2.90909 -1.13574C2.58032 -0.468244 2.12204 -0.109589 1.7335 -0.109589C1.39477 -0.109589 1.066 -0.37858 1.066 -1.11582C1.066 -1.30511 1.066 -1.4944 1.2254 -2.12204L1.44458 -3.03861Z' id='g0-98'/>
-<path d='M1.86301 -2.30137C2.15193 -2.30137 2.88917 -2.3213 3.3873 -2.53051C4.08468 -2.82939 4.1345 -3.41719 4.1345 -3.55666C4.1345 -3.99502 3.75592 -4.40349 3.06849 -4.40349C1.96264 -4.40349 0.458281 -3.43711 0.458281 -1.69365C0.458281 -0.67746 1.04608 0.109589 2.02242 0.109589C3.44707 0.109589 4.28394 -0.946451 4.28394 -1.066C4.28394 -1.12578 4.22416 -1.19552 4.16438 -1.19552C4.11457 -1.19552 4.09465 -1.17559 4.03487 -1.09589C3.24782 -0.109589 2.16189 -0.109589 2.04234 -0.109589C1.26526 -0.109589 1.17559 -0.946451 1.17559 -1.26526C1.17559 -1.38481 1.18555 -1.69365 1.33499 -2.30137H1.86301ZM1.39477 -2.52055C1.78331 -4.03487 2.80946 -4.18431 3.06849 -4.18431C3.53674 -4.18431 3.80573 -3.89539 3.80573 -3.55666C3.80573 -2.52055 2.21171 -2.52055 1.80324 -2.52055H1.39477Z' id='g0-101'/>
-<path d='M2.57036 -6.80448C2.57036 -6.81445 2.57036 -6.91407 2.44085 -6.91407C2.21171 -6.91407 1.48443 -6.83437 1.2254 -6.81445C1.1457 -6.80448 1.03611 -6.79452 1.03611 -6.60523C1.03611 -6.49564 1.13574 -6.49564 1.28518 -6.49564C1.76339 -6.49564 1.77335 -6.40598 1.77335 -6.32628L1.74346 -6.12702L0.488169 -1.1457C0.458281 -1.03611 0.438356 -0.966376 0.438356 -0.806974C0.438356 -0.239103 0.876712 0.109589 1.34496 0.109589C1.67372 0.109589 1.92279 -0.0896638 2.09215 -0.448319C2.27148 -0.826899 2.39103 -1.40473 2.39103 -1.42466C2.39103 -1.52428 2.30137 -1.52428 2.27148 -1.52428C2.17186 -1.52428 2.16189 -1.48443 2.132 -1.34496C1.96264 -0.697385 1.77335 -0.109589 1.37484 -0.109589C1.07597 -0.109589 1.07597 -0.428394 1.07597 -0.56787C1.07597 -0.806974 1.08593 -0.856787 1.13574 -1.04608L2.57036 -6.80448Z' id='g0-108'/>
-</defs>
-<g id='page1'>
-<use x='161.597' xlink:href='#g0-108' y='0'/>
-<use x='164.765' xlink:href='#g0-97' y='0'/>
-<use x='170.031' xlink:href='#g0-98' y='0'/>
-<use x='174.307' xlink:href='#g0-101' y='0'/>
-<use x='178.946' xlink:href='#g0-108' y='0'/>
-</g>
-</svg>
\ No newline at end of file
diff --git a/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.tex b/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.tex
deleted file mode 100644
index 4c2651426..000000000
--- a/tests/control_data/graphical_units_data/deepcopy/Tex/b26c2d37c7d91fb6.tex
+++ /dev/null
@@ -1,10 +0,0 @@
-\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}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\linespread{1}
-\DisableLigatures{encoding = *, family = *}
-
-\begin{document}
-
-\begin{align*}
-label
-\end{align*}
-
-\end{document}
\ No newline at end of file
diff --git a/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.aux b/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.aux
deleted file mode 100644
index f23e54680..000000000
--- a/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.aux
+++ /dev/null
@@ -1 +0,0 @@
-\relax
diff --git a/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.dvi b/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.dvi
deleted file mode 100644
index 8be047e54..000000000
Binary files a/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.dvi and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.svg b/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.svg
deleted file mode 100644
index f57a02d91..000000000
--- a/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- This file was generated by dvisvgm 2.1.3 -->
-<svg height='1.1955pt' version='1.1' viewBox='162.889 2.98878 17.9329 1.1955' width='17.9329pt' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
-<defs>
-<path d='M4.58281 -0.916563C4.58281 -1.18555 4.58281 -1.19552 4.3736 -1.19552C3.35741 -1.19552 1.11582 -0.71731 -0.239103 1.71357V1.87298C-0.239103 2.12204 -0.229141 2.132 0 2.132C0.18929 2.132 0.199253 2.12204 0.249066 2.0523C1.066 0.747198 2.44085 0.0398506 4.46326 0C4.58281 0 4.58281 -0.0697385 4.58281 -0.278954V-0.916563Z' id='g0-122'/>
-<path d='M4.72229 1.71357C3.36737 -0.727273 1.12578 -1.19552 0.109589 -1.19552C-0.0996264 -1.19552 -0.0996264 -1.18555 -0.0996264 -0.916563V-0.278954C-0.0996264 -0.0498132 -0.0996264 0 0.0398506 0C0.647572 0.00996264 1.63387 0.0896638 2.53051 0.52802C3.60648 1.066 4.01494 1.69365 4.26401 2.08219C4.2939 2.132 4.35367 2.132 4.48319 2.132C4.71233 2.132 4.72229 2.12204 4.72229 1.87298V1.71357Z' id='g0-123'/>
-<path d='M4.58281 -0.916563C4.58281 -1.1457 4.58281 -1.19552 4.44334 -1.19552C3.83562 -1.20548 2.84932 -1.28518 1.95268 -1.72354C0.876712 -2.26152 0.468244 -2.88917 0.219178 -3.27771C0.18929 -3.32752 0.129514 -3.32752 0 -3.32752C-0.229141 -3.32752 -0.239103 -3.31756 -0.239103 -3.06849V-2.90909C1.11582 -0.468244 3.35741 0 4.3736 0C4.58281 0 4.58281 -0.00996264 4.58281 -0.278954V-0.916563Z' id='g0-124'/>
-<path d='M4.72229 -3.06849C4.72229 -3.31756 4.71233 -3.32752 4.48319 -3.32752C4.2939 -3.32752 4.28394 -3.31756 4.23412 -3.24782C3.41719 -1.94271 2.04234 -1.23537 0.0199253 -1.19552C-0.0996264 -1.19552 -0.0996264 -1.12578 -0.0996264 -0.916563V-0.278954C-0.0996264 -0.00996264 -0.0996264 0 0.109589 0C1.12578 0 3.36737 -0.478207 4.72229 -2.90909V-3.06849Z' id='g0-125'/>
-</defs>
-<g id='page1'>
-<use x='162.889' xlink:href='#g0-124' y='4.18428'/>
-<use x='167.372' xlink:href='#g0-123' y='4.18428'/>
-<use x='171.856' xlink:href='#g0-122' y='4.18428'/>
-<use x='176.339' xlink:href='#g0-125' y='4.18428'/>
-</g>
-</svg>
\ No newline at end of file
diff --git a/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.tex b/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.tex
deleted file mode 100644
index 2c24ba153..000000000
--- a/tests/control_data/graphical_units_data/deepcopy/Tex/bb964ccc0ded6db8.tex
+++ /dev/null
@@ -1,10 +0,0 @@
-\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}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\linespread{1}
-\DisableLigatures{encoding = *, family = *}
-
-\begin{document}
-
-\begin{align*}
-\underbrace{}
-\end{align*}
-
-\end{document}
\ No newline at end of file
diff --git a/tests/control_data/graphical_units_data/functions/FunctionGraph.npz b/tests/control_data/graphical_units_data/functions/FunctionGraph.npz
new file mode 100644
index 000000000..d33b2a3ce
Binary files /dev/null and b/tests/control_data/graphical_units_data/functions/FunctionGraph.npz differ
diff --git a/tests/control_data/graphical_units_data/functions/FunctionGraphTest.npz b/tests/control_data/graphical_units_data/functions/FunctionGraphTest.npz
deleted file mode 100644
index c414a552d..000000000
Binary files a/tests/control_data/graphical_units_data/functions/FunctionGraphTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Angle.npz b/tests/control_data/graphical_units_data/geometry/Angle.npz
new file mode 100644
index 000000000..96cab2243
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Angle.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/AngleTest.npz b/tests/control_data/graphical_units_data/geometry/AngleTest.npz
deleted file mode 100644
index 19fdf31ee..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/AngleTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/AnnotationDot.npz b/tests/control_data/graphical_units_data/geometry/AnnotationDot.npz
new file mode 100644
index 000000000..c73dd1694
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/AnnotationDot.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/AnnotationDotTest.npz b/tests/control_data/graphical_units_data/geometry/AnnotationDotTest.npz
deleted file mode 100644
index 7db83a38f..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/AnnotationDotTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/AnnularSector.npz b/tests/control_data/graphical_units_data/geometry/AnnularSector.npz
new file mode 100644
index 000000000..f229cc852
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/AnnularSector.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/AnnularSectorTest.npz b/tests/control_data/graphical_units_data/geometry/AnnularSectorTest.npz
deleted file mode 100644
index cb6ef9cab..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/AnnularSectorTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Annulus.npz b/tests/control_data/graphical_units_data/geometry/Annulus.npz
new file mode 100644
index 000000000..f7029ef06
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Annulus.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/AnnulusTest.npz b/tests/control_data/graphical_units_data/geometry/AnnulusTest.npz
deleted file mode 100644
index 4221bcde1..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/AnnulusTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Arc.npz b/tests/control_data/graphical_units_data/geometry/Arc.npz
new file mode 100644
index 000000000..5bb130ad2
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Arc.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/ArcBetweenPoints.npz b/tests/control_data/graphical_units_data/geometry/ArcBetweenPoints.npz
new file mode 100644
index 000000000..0257f6bb9
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/ArcBetweenPoints.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/ArcBetweenPointsTest.npz b/tests/control_data/graphical_units_data/geometry/ArcBetweenPointsTest.npz
deleted file mode 100644
index 383926737..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/ArcBetweenPointsTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/ArcTest.npz b/tests/control_data/graphical_units_data/geometry/ArcTest.npz
deleted file mode 100644
index 6e2b86e43..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/ArcTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Arrange.npz b/tests/control_data/graphical_units_data/geometry/Arrange.npz
new file mode 100644
index 000000000..2375320bb
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Arrange.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/ArrangeTest.npz b/tests/control_data/graphical_units_data/geometry/ArrangeTest.npz
deleted file mode 100644
index 4c80a2a02..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/ArrangeTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Circle.npz b/tests/control_data/graphical_units_data/geometry/Circle.npz
new file mode 100644
index 000000000..63b2b2f67
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Circle.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/CirclePoints.npz b/tests/control_data/graphical_units_data/geometry/CirclePoints.npz
new file mode 100644
index 000000000..1ec3ceebb
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/CirclePoints.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/CirclePointsTest.npz b/tests/control_data/graphical_units_data/geometry/CirclePointsTest.npz
deleted file mode 100644
index 477db848f..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CirclePointsTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/CircleTest.npz b/tests/control_data/graphical_units_data/geometry/CircleTest.npz
deleted file mode 100644
index 5622807c5..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CircleTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Coordinates.npz b/tests/control_data/graphical_units_data/geometry/Coordinates.npz
new file mode 100644
index 000000000..3f0e04bee
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Coordinates.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/CoordinatesTest.npz b/tests/control_data/graphical_units_data/geometry/CoordinatesTest.npz
deleted file mode 100644
index 94b122d26..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CoordinatesTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/CurvedArrow.npz b/tests/control_data/graphical_units_data/geometry/CurvedArrow.npz
new file mode 100644
index 000000000..8c86f738c
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/CurvedArrow.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/CurvedArrowTest.npz b/tests/control_data/graphical_units_data/geometry/CurvedArrowTest.npz
deleted file mode 100644
index 75ce061e1..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CurvedArrowTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/CustomDoubleArrow.npz b/tests/control_data/graphical_units_data/geometry/CustomDoubleArrow.npz
new file mode 100644
index 000000000..720f5fd50
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/CustomDoubleArrow.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/CustomDoubleArrowTest.npz b/tests/control_data/graphical_units_data/geometry/CustomDoubleArrowTest.npz
deleted file mode 100644
index c1771dee9..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/CustomDoubleArrowTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/DashedVMobject.npz b/tests/control_data/graphical_units_data/geometry/DashedVMobject.npz
new file mode 100644
index 000000000..6ef3a6b9b
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/DashedVMobject.npz differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeOutAndShiftTest.npz b/tests/control_data/graphical_units_data/geometry/Dot.npz
similarity index 73%
rename from tests/control_data/graphical_units_data/creation/FadeOutAndShiftTest.npz
rename to tests/control_data/graphical_units_data/geometry/Dot.npz
index f8eb0c53b..2adb2ccc4 100644
Binary files a/tests/control_data/graphical_units_data/creation/FadeOutAndShiftTest.npz and b/tests/control_data/graphical_units_data/geometry/Dot.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/DotTest.npz b/tests/control_data/graphical_units_data/geometry/DotTest.npz
deleted file mode 100644
index 5a0294962..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/DotTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/ShrinkToCenterTest.npz b/tests/control_data/graphical_units_data/geometry/DoubleArrow.npz
similarity index 65%
rename from tests/control_data/graphical_units_data/creation/ShrinkToCenterTest.npz
rename to tests/control_data/graphical_units_data/geometry/DoubleArrow.npz
index f8eb0c53b..01739318a 100644
Binary files a/tests/control_data/graphical_units_data/creation/ShrinkToCenterTest.npz and b/tests/control_data/graphical_units_data/geometry/DoubleArrow.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/DoubleArrowTest.npz b/tests/control_data/graphical_units_data/geometry/DoubleArrowTest.npz
deleted file mode 100644
index 1a1c711ca..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/DoubleArrowTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/UncreateTest.npz b/tests/control_data/graphical_units_data/geometry/Elbow.npz
similarity index 73%
rename from tests/control_data/graphical_units_data/creation/UncreateTest.npz
rename to tests/control_data/graphical_units_data/geometry/Elbow.npz
index f8eb0c53b..7068f03a4 100644
Binary files a/tests/control_data/graphical_units_data/creation/UncreateTest.npz and b/tests/control_data/graphical_units_data/geometry/Elbow.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/ElbowTest.npz b/tests/control_data/graphical_units_data/geometry/ElbowTest.npz
deleted file mode 100644
index fb9aa2d24..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/ElbowTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Ellipse.npz b/tests/control_data/graphical_units_data/geometry/Ellipse.npz
new file mode 100644
index 000000000..f6a1ef43a
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Ellipse.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/EllipseTest.npz b/tests/control_data/graphical_units_data/geometry/EllipseTest.npz
deleted file mode 100644
index e03a18dcd..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/EllipseTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/LineTest.npz b/tests/control_data/graphical_units_data/geometry/Line.npz
similarity index 71%
rename from tests/control_data/graphical_units_data/geometry/LineTest.npz
rename to tests/control_data/graphical_units_data/geometry/Line.npz
index c00ad5f58..ae3d4bdf7 100644
Binary files a/tests/control_data/graphical_units_data/geometry/LineTest.npz and b/tests/control_data/graphical_units_data/geometry/Line.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/Polygon.npz b/tests/control_data/graphical_units_data/geometry/Polygon.npz
new file mode 100644
index 000000000..548849273
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Polygon.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/PolygonTest.npz b/tests/control_data/graphical_units_data/geometry/PolygonTest.npz
deleted file mode 100644
index ed0f2ec9c..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/PolygonTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Polygram.npz b/tests/control_data/graphical_units_data/geometry/Polygram.npz
new file mode 100644
index 000000000..fdfc4ee06
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Polygram.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/PolygramTest.npz b/tests/control_data/graphical_units_data/geometry/PolygramTest.npz
deleted file mode 100644
index b3e1cd1ce..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/PolygramTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Rectangle.npz b/tests/control_data/graphical_units_data/geometry/Rectangle.npz
new file mode 100644
index 000000000..d6cb95a7d
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Rectangle.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/RectangleTest.npz b/tests/control_data/graphical_units_data/geometry/RectangleTest.npz
deleted file mode 100644
index 735e00cf4..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/RectangleTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/RegularPolygram.npz b/tests/control_data/graphical_units_data/geometry/RegularPolygram.npz
new file mode 100644
index 000000000..184e6120e
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/RegularPolygram.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/RegularPolygramTest.npz b/tests/control_data/graphical_units_data/geometry/RegularPolygramTest.npz
deleted file mode 100644
index bfe54a512..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/RegularPolygramTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/RightAngleTest.npz b/tests/control_data/graphical_units_data/geometry/RightAngle.npz
similarity index 73%
rename from tests/control_data/graphical_units_data/geometry/RightAngleTest.npz
rename to tests/control_data/graphical_units_data/geometry/RightAngle.npz
index 241860285..3ea7a3be7 100644
Binary files a/tests/control_data/graphical_units_data/geometry/RightAngleTest.npz and b/tests/control_data/graphical_units_data/geometry/RightAngle.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/RoundedRectangle.npz b/tests/control_data/graphical_units_data/geometry/RoundedRectangle.npz
new file mode 100644
index 000000000..f77b88221
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/RoundedRectangle.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/RoundedRectangleTest.npz b/tests/control_data/graphical_units_data/geometry/RoundedRectangleTest.npz
deleted file mode 100644
index 3576480d5..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/RoundedRectangleTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Sector.npz b/tests/control_data/graphical_units_data/geometry/Sector.npz
new file mode 100644
index 000000000..3af257c26
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Sector.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/SectorTest.npz b/tests/control_data/graphical_units_data/geometry/SectorTest.npz
deleted file mode 100644
index 3e44cfb75..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/SectorTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Star.npz b/tests/control_data/graphical_units_data/geometry/Star.npz
new file mode 100644
index 000000000..8c4c938ef
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Star.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/StarTest.npz b/tests/control_data/graphical_units_data/geometry/StarTest.npz
deleted file mode 100644
index 650fc87eb..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/StarTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/Vector.npz b/tests/control_data/graphical_units_data/geometry/Vector.npz
new file mode 100644
index 000000000..45421eb67
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/Vector.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/VectorTest.npz b/tests/control_data/graphical_units_data/geometry/VectorTest.npz
deleted file mode 100644
index c8b465dbf..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/VectorTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/geometry/ZIndex.npz b/tests/control_data/graphical_units_data/geometry/ZIndex.npz
new file mode 100644
index 000000000..b109d8c16
Binary files /dev/null and b/tests/control_data/graphical_units_data/geometry/ZIndex.npz differ
diff --git a/tests/control_data/graphical_units_data/geometry/ZIndexTest.npz b/tests/control_data/graphical_units_data/geometry/ZIndexTest.npz
deleted file mode 100644
index 381e43b5b..000000000
Binary files a/tests/control_data/graphical_units_data/geometry/ZIndexTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/graphscene/PlotFunctions.npz b/tests/control_data/graphical_units_data/graphscene/PlotFunctions.npz
new file mode 100644
index 000000000..a96aecb69
Binary files /dev/null and b/tests/control_data/graphical_units_data/graphscene/PlotFunctions.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/Arcs01.npz b/tests/control_data/graphical_units_data/img_and_svg/Arcs01.npz
new file mode 100644
index 000000000..82fb79b07
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/Arcs01.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/Arcs01Test.npz b/tests/control_data/graphical_units_data/img_and_svg/Arcs01Test.npz
deleted file mode 100644
index 5426da05a..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/Arcs01Test.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/Arcs02.npz b/tests/control_data/graphical_units_data/img_and_svg/Arcs02.npz
new file mode 100644
index 000000000..23040991a
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/Arcs02.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/Arcs02Test.npz b/tests/control_data/graphical_units_data/img_and_svg/Arcs02Test.npz
deleted file mode 100644
index 5850444a8..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/Arcs02Test.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurve.npz b/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurve.npz
new file mode 100644
index 000000000..86d7587b9
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurve.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurveTest.npz b/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurveTest.npz
deleted file mode 100644
index 74fe68e35..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurveTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMap.npz b/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMap.npz
new file mode 100644
index 000000000..3e67b429d
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMap.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMapTest.npz b/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMapTest.npz
deleted file mode 100644
index 971a67190..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMapTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/CubicAndLineto.npz b/tests/control_data/graphical_units_data/img_and_svg/CubicAndLineto.npz
new file mode 100644
index 000000000..036827910
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/CubicAndLineto.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/CubicAndLinetoTest.npz b/tests/control_data/graphical_units_data/img_and_svg/CubicAndLinetoTest.npz
deleted file mode 100644
index 524c1b2bd..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/CubicAndLinetoTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/CubicPath.npz b/tests/control_data/graphical_units_data/img_and_svg/CubicPath.npz
new file mode 100644
index 000000000..c008af373
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/CubicPath.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/CubicPathTest.npz b/tests/control_data/graphical_units_data/img_and_svg/CubicPathTest.npz
deleted file mode 100644
index 5b89171de..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/CubicPathTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1.npz b/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1.npz
new file mode 100644
index 000000000..3ed00b307
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1Test.npz b/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1Test.npz
deleted file mode 100644
index 7b32d5390..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1Test.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/FancyGTest.npz b/tests/control_data/graphical_units_data/img_and_svg/FancyGTest.npz
deleted file mode 100644
index b7be104f9..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/FancyGTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/HalfEllipse.npz b/tests/control_data/graphical_units_data/img_and_svg/HalfEllipse.npz
new file mode 100644
index 000000000..644b73244
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/HalfEllipse.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/HalfEllipseTest.npz b/tests/control_data/graphical_units_data/img_and_svg/HalfEllipseTest.npz
deleted file mode 100644
index 931e62f00..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/HalfEllipseTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/Heart.npz b/tests/control_data/graphical_units_data/img_and_svg/Heart.npz
new file mode 100644
index 000000000..90a6f3a59
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/Heart.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/HeartTest.npz b/tests/control_data/graphical_units_data/img_and_svg/HeartTest.npz
deleted file mode 100644
index 3cec93b8b..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/HeartTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ImageInterpolation.npz b/tests/control_data/graphical_units_data/img_and_svg/ImageInterpolation.npz
new file mode 100644
index 000000000..fad18d752
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/ImageInterpolation.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ImageInterpolationTest.npz b/tests/control_data/graphical_units_data/img_and_svg/ImageInterpolationTest.npz
deleted file mode 100644
index 2824ec627..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/ImageInterpolationTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ImageMobject.npz b/tests/control_data/graphical_units_data/img_and_svg/ImageMobject.npz
new file mode 100644
index 000000000..92adbfa2e
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/ImageMobject.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ImageMobjectTest.npz b/tests/control_data/graphical_units_data/img_and_svg/ImageMobjectTest.npz
deleted file mode 100644
index db7f87c61..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/ImageMobjectTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/Inheritance.npz b/tests/control_data/graphical_units_data/img_and_svg/Inheritance.npz
new file mode 100644
index 000000000..f2395bdec
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/Inheritance.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/InheritanceTest.npz b/tests/control_data/graphical_units_data/img_and_svg/InheritanceTest.npz
deleted file mode 100644
index 694545d43..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/InheritanceTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/LineTest.npz b/tests/control_data/graphical_units_data/img_and_svg/Line.npz
similarity index 77%
rename from tests/control_data/graphical_units_data/img_and_svg/LineTest.npz
rename to tests/control_data/graphical_units_data/img_and_svg/Line.npz
index 0969c62c0..30c355c8c 100644
Binary files a/tests/control_data/graphical_units_data/img_and_svg/LineTest.npz and b/tests/control_data/graphical_units_data/img_and_svg/Line.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/LogoTest.npz b/tests/control_data/graphical_units_data/img_and_svg/LogoTest.npz
deleted file mode 100644
index 0210c3355..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/LogoTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/MSModelTest.npz b/tests/control_data/graphical_units_data/img_and_svg/MSModelTest.npz
deleted file mode 100644
index 13bdf4591..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/MSModelTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ManimLogo.npz b/tests/control_data/graphical_units_data/img_and_svg/ManimLogo.npz
new file mode 100644
index 000000000..618857d4e
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/ManimLogo.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ManimLogoTest.npz b/tests/control_data/graphical_units_data/img_and_svg/ManimLogoTest.npz
deleted file mode 100644
index f542cf56f..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/ManimLogoTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/MatrixTransform.npz b/tests/control_data/graphical_units_data/img_and_svg/MatrixTransform.npz
new file mode 100644
index 000000000..9ae78cd40
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/MatrixTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/MatrixTransformTest.npz b/tests/control_data/graphical_units_data/img_and_svg/MatrixTransformTest.npz
deleted file mode 100644
index 810cc8f70..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/MatrixTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/MultiPartPath.npz b/tests/control_data/graphical_units_data/img_and_svg/MultiPartPath.npz
new file mode 100644
index 000000000..13779d26a
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/MultiPartPath.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/MultiPartPathTest.npz b/tests/control_data/graphical_units_data/img_and_svg/MultiPartPathTest.npz
deleted file mode 100644
index 37a85b8b6..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/MultiPartPathTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/MultipleTransform.npz b/tests/control_data/graphical_units_data/img_and_svg/MultipleTransform.npz
new file mode 100644
index 000000000..217f20f7b
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/MultipleTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/MultipleTransformTest.npz b/tests/control_data/graphical_units_data/img_and_svg/MultipleTransformTest.npz
deleted file mode 100644
index 93eb7352c..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/MultipleTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/Penrose.npz b/tests/control_data/graphical_units_data/img_and_svg/Penrose.npz
new file mode 100644
index 000000000..b5fa1e02d
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/Penrose.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/PenroseTest.npz b/tests/control_data/graphical_units_data/img_and_svg/PenroseTest.npz
deleted file mode 100644
index e82446499..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/PenroseTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/PixelizedText.npz b/tests/control_data/graphical_units_data/img_and_svg/PixelizedText.npz
new file mode 100644
index 000000000..ad38f7034
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/PixelizedText.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/PixelizedTextTest.npz b/tests/control_data/graphical_units_data/img_and_svg/PixelizedTextTest.npz
deleted file mode 100644
index da165e7d4..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/PixelizedTextTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/QuadraticPath.npz b/tests/control_data/graphical_units_data/img_and_svg/QuadraticPath.npz
new file mode 100644
index 000000000..48de2144d
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/QuadraticPath.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/QuadraticPathTest.npz b/tests/control_data/graphical_units_data/img_and_svg/QuadraticPathTest.npz
deleted file mode 100644
index c9a116799..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/QuadraticPathTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/Rhomboid.npz b/tests/control_data/graphical_units_data/img_and_svg/Rhomboid.npz
new file mode 100644
index 000000000..769f500b1
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/Rhomboid.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/RhomboidTest.npz b/tests/control_data/graphical_units_data/img_and_svg/RhomboidTest.npz
deleted file mode 100644
index d5f463009..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/RhomboidTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/RotateTransform.npz b/tests/control_data/graphical_units_data/img_and_svg/RotateTransform.npz
new file mode 100644
index 000000000..f78c65321
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/RotateTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/RotateTransformTest.npz b/tests/control_data/graphical_units_data/img_and_svg/RotateTransformTest.npz
deleted file mode 100644
index 41d1035b2..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/RotateTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ScaleTransform.npz b/tests/control_data/graphical_units_data/img_and_svg/ScaleTransform.npz
new file mode 100644
index 000000000..b464e1cb6
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/ScaleTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/ScaleTransformTest.npz b/tests/control_data/graphical_units_data/img_and_svg/ScaleTransformTest.npz
deleted file mode 100644
index 0a70d4f98..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/ScaleTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/SingleUSState.npz b/tests/control_data/graphical_units_data/img_and_svg/SingleUSState.npz
new file mode 100644
index 000000000..2840601fe
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/SingleUSState.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/SingleUSStateTest.npz b/tests/control_data/graphical_units_data/img_and_svg/SingleUSStateTest.npz
deleted file mode 100644
index ba975d6bc..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/SingleUSStateTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/SkewXTransform.npz b/tests/control_data/graphical_units_data/img_and_svg/SkewXTransform.npz
new file mode 100644
index 000000000..6f74fbc84
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/SkewXTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/SkewXTransformTest.npz b/tests/control_data/graphical_units_data/img_and_svg/SkewXTransformTest.npz
deleted file mode 100644
index 9847e9ae6..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/SkewXTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/SkewYTransform.npz b/tests/control_data/graphical_units_data/img_and_svg/SkewYTransform.npz
new file mode 100644
index 000000000..6f74fbc84
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/SkewYTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/SkewYTransformTest.npz b/tests/control_data/graphical_units_data/img_and_svg/SkewYTransformTest.npz
deleted file mode 100644
index 9847e9ae6..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/SkewYTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/SmoothCurves.npz b/tests/control_data/graphical_units_data/img_and_svg/SmoothCurves.npz
new file mode 100644
index 000000000..f1f5fa561
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/SmoothCurves.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/SmoothCurvesTest.npz b/tests/control_data/graphical_units_data/img_and_svg/SmoothCurvesTest.npz
deleted file mode 100644
index a729e259d..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/SmoothCurvesTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/StarchTest.npz b/tests/control_data/graphical_units_data/img_and_svg/StarchTest.npz
deleted file mode 100644
index 040892b06..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/StarchTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/TranslateTransform.npz b/tests/control_data/graphical_units_data/img_and_svg/TranslateTransform.npz
new file mode 100644
index 000000000..7b318538a
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/TranslateTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/TranslateTransformTest.npz b/tests/control_data/graphical_units_data/img_and_svg/TranslateTransformTest.npz
deleted file mode 100644
index 834b585e5..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/TranslateTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/UKFlag.npz b/tests/control_data/graphical_units_data/img_and_svg/UKFlag.npz
new file mode 100644
index 000000000..fb29b5c5d
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/UKFlag.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/UKFlagTest.npz b/tests/control_data/graphical_units_data/img_and_svg/UKFlagTest.npz
deleted file mode 100644
index c0cfe42aa..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/UKFlagTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/UseTagInheritance.npz b/tests/control_data/graphical_units_data/img_and_svg/UseTagInheritance.npz
new file mode 100644
index 000000000..77bc5e6af
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/UseTagInheritance.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/UseTagInheritanceTest.npz b/tests/control_data/graphical_units_data/img_and_svg/UseTagInheritanceTest.npz
deleted file mode 100644
index 9825dd8f9..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/UseTagInheritanceTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/VideoIcon.npz b/tests/control_data/graphical_units_data/img_and_svg/VideoIcon.npz
new file mode 100644
index 000000000..cd8a9b125
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/VideoIcon.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/VideoIconTest.npz b/tests/control_data/graphical_units_data/img_and_svg/VideoIconTest.npz
deleted file mode 100644
index a497d38a0..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/VideoIconTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/WatchTheDecimals.npz b/tests/control_data/graphical_units_data/img_and_svg/WatchTheDecimals.npz
index 9ed274738..f98436b2c 100644
Binary files a/tests/control_data/graphical_units_data/img_and_svg/WatchTheDecimals.npz and b/tests/control_data/graphical_units_data/img_and_svg/WatchTheDecimals.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/WeightSVG.npz b/tests/control_data/graphical_units_data/img_and_svg/WeightSVG.npz
new file mode 100644
index 000000000..767083295
Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/WeightSVG.npz differ
diff --git a/tests/control_data/graphical_units_data/img_and_svg/WeightSVGTest.npz b/tests/control_data/graphical_units_data/img_and_svg/WeightSVGTest.npz
deleted file mode 100644
index fe7755562..000000000
Binary files a/tests/control_data/graphical_units_data/img_and_svg/WeightSVGTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/ApplyWave.npz b/tests/control_data/graphical_units_data/indication/ApplyWave.npz
new file mode 100644
index 000000000..13357b70c
Binary files /dev/null and b/tests/control_data/graphical_units_data/indication/ApplyWave.npz differ
diff --git a/tests/control_data/graphical_units_data/indication/ApplyWaveTest.npz b/tests/control_data/graphical_units_data/indication/ApplyWaveTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/indication/ApplyWaveTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/Circumscribe.npz b/tests/control_data/graphical_units_data/indication/Circumscribe.npz
new file mode 100644
index 000000000..b926e1240
Binary files /dev/null and b/tests/control_data/graphical_units_data/indication/Circumscribe.npz differ
diff --git a/tests/control_data/graphical_units_data/indication/CircumscribeTest.npz b/tests/control_data/graphical_units_data/indication/CircumscribeTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/indication/CircumscribeTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/Flash.npz b/tests/control_data/graphical_units_data/indication/Flash.npz
new file mode 100644
index 000000000..ae1449576
Binary files /dev/null and b/tests/control_data/graphical_units_data/indication/Flash.npz differ
diff --git a/tests/control_data/graphical_units_data/indication/FlashTest.npz b/tests/control_data/graphical_units_data/indication/FlashTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/indication/FlashTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/FocusOn.npz b/tests/control_data/graphical_units_data/indication/FocusOn.npz
new file mode 100644
index 000000000..67055c206
Binary files /dev/null and b/tests/control_data/graphical_units_data/indication/FocusOn.npz differ
diff --git a/tests/control_data/graphical_units_data/indication/FocusOnTest.npz b/tests/control_data/graphical_units_data/indication/FocusOnTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/indication/FocusOnTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/Indicate.npz b/tests/control_data/graphical_units_data/indication/Indicate.npz
new file mode 100644
index 000000000..44d6e7d1f
Binary files /dev/null and b/tests/control_data/graphical_units_data/indication/Indicate.npz differ
diff --git a/tests/control_data/graphical_units_data/indication/IndicateTest.npz b/tests/control_data/graphical_units_data/indication/IndicateTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/indication/IndicateTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOut.npz b/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOut.npz
new file mode 100644
index 000000000..8ce8c56c3
Binary files /dev/null and b/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOut.npz differ
diff --git a/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOutTest.npz b/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOutTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/indication/ShowCreationThenFadeOutTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/ShowPassingFlash.npz b/tests/control_data/graphical_units_data/indication/ShowPassingFlash.npz
new file mode 100644
index 000000000..1b16902ab
Binary files /dev/null and b/tests/control_data/graphical_units_data/indication/ShowPassingFlash.npz differ
diff --git a/tests/control_data/graphical_units_data/indication/ShowPassingFlashTest.npz b/tests/control_data/graphical_units_data/indication/ShowPassingFlashTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/indication/ShowPassingFlashTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/indication/Wiggle.npz b/tests/control_data/graphical_units_data/indication/Wiggle.npz
new file mode 100644
index 000000000..79898a858
Binary files /dev/null and b/tests/control_data/graphical_units_data/indication/Wiggle.npz differ
diff --git a/tests/control_data/graphical_units_data/indication/WiggleTest.npz b/tests/control_data/graphical_units_data/indication/WiggleTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/indication/WiggleTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/mobjects/PointCloudDot.npz b/tests/control_data/graphical_units_data/mobjects/PointCloudDot.npz
new file mode 100644
index 000000000..54f461e25
Binary files /dev/null and b/tests/control_data/graphical_units_data/mobjects/PointCloudDot.npz differ
diff --git a/tests/control_data/graphical_units_data/mobjects/PointCloudDotTest.npz b/tests/control_data/graphical_units_data/mobjects/PointCloudDotTest.npz
deleted file mode 100644
index 5e523ae8c..000000000
Binary files a/tests/control_data/graphical_units_data/mobjects/PointCloudDotTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/modifier_methods/Gradient.npz b/tests/control_data/graphical_units_data/modifier_methods/Gradient.npz
new file mode 100644
index 000000000..435fa8878
Binary files /dev/null and b/tests/control_data/graphical_units_data/modifier_methods/Gradient.npz differ
diff --git a/tests/control_data/graphical_units_data/modifier_methods/GradientRotation.npz b/tests/control_data/graphical_units_data/modifier_methods/GradientRotation.npz
new file mode 100644
index 000000000..b7d956dd7
Binary files /dev/null and b/tests/control_data/graphical_units_data/modifier_methods/GradientRotation.npz differ
diff --git a/tests/control_data/graphical_units_data/modifier_methods/GradientRotationTest.npz b/tests/control_data/graphical_units_data/modifier_methods/GradientRotationTest.npz
deleted file mode 100644
index 52d888ee2..000000000
Binary files a/tests/control_data/graphical_units_data/modifier_methods/GradientRotationTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/modifier_methods/GradientTest.npz b/tests/control_data/graphical_units_data/modifier_methods/GradientTest.npz
deleted file mode 100644
index c3b32892c..000000000
Binary files a/tests/control_data/graphical_units_data/modifier_methods/GradientTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/Homotopy.npz b/tests/control_data/graphical_units_data/movements/Homotopy.npz
new file mode 100644
index 000000000..8d80b5204
Binary files /dev/null and b/tests/control_data/graphical_units_data/movements/Homotopy.npz differ
diff --git a/tests/control_data/graphical_units_data/movements/HomotopyTest.npz b/tests/control_data/graphical_units_data/movements/HomotopyTest.npz
deleted file mode 100644
index 532f51f80..000000000
Binary files a/tests/control_data/graphical_units_data/movements/HomotopyTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/MoveAlongPath.npz b/tests/control_data/graphical_units_data/movements/MoveAlongPath.npz
new file mode 100644
index 000000000..cc6f42752
Binary files /dev/null and b/tests/control_data/graphical_units_data/movements/MoveAlongPath.npz differ
diff --git a/tests/control_data/graphical_units_data/movements/MoveAlongPathTest.npz b/tests/control_data/graphical_units_data/movements/MoveAlongPathTest.npz
deleted file mode 100644
index 04a629866..000000000
Binary files a/tests/control_data/graphical_units_data/movements/MoveAlongPathTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/MoveTo.npz b/tests/control_data/graphical_units_data/movements/MoveTo.npz
new file mode 100644
index 000000000..6a3268d11
Binary files /dev/null and b/tests/control_data/graphical_units_data/movements/MoveTo.npz differ
diff --git a/tests/control_data/graphical_units_data/movements/MoveToTest.npz b/tests/control_data/graphical_units_data/movements/MoveToTest.npz
deleted file mode 100644
index 50f3af687..000000000
Binary files a/tests/control_data/graphical_units_data/movements/MoveToTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/PhaseFlow.npz b/tests/control_data/graphical_units_data/movements/PhaseFlow.npz
new file mode 100644
index 000000000..de58b1451
Binary files /dev/null and b/tests/control_data/graphical_units_data/movements/PhaseFlow.npz differ
diff --git a/tests/control_data/graphical_units_data/movements/PhaseFlowTest.npz b/tests/control_data/graphical_units_data/movements/PhaseFlowTest.npz
deleted file mode 100644
index 2d84c60a7..000000000
Binary files a/tests/control_data/graphical_units_data/movements/PhaseFlowTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/Rotate.npz b/tests/control_data/graphical_units_data/movements/Rotate.npz
new file mode 100644
index 000000000..f0b495651
Binary files /dev/null and b/tests/control_data/graphical_units_data/movements/Rotate.npz differ
diff --git a/tests/control_data/graphical_units_data/movements/RotateTest.npz b/tests/control_data/graphical_units_data/movements/RotateTest.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/movements/RotateTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/movements/Shift.npz b/tests/control_data/graphical_units_data/movements/Shift.npz
new file mode 100644
index 000000000..b7dfd8d98
Binary files /dev/null and b/tests/control_data/graphical_units_data/movements/Shift.npz differ
diff --git a/tests/control_data/graphical_units_data/movements/ShiftTest.npz b/tests/control_data/graphical_units_data/movements/ShiftTest.npz
deleted file mode 100644
index 235cba9c6..000000000
Binary files a/tests/control_data/graphical_units_data/movements/ShiftTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/opengl/CircleTest.npz b/tests/control_data/graphical_units_data/opengl/CircleTest.npz
deleted file mode 100644
index 8754ab2af..000000000
Binary files a/tests/control_data/graphical_units_data/opengl/CircleTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/plot/AxesTest.npz b/tests/control_data/graphical_units_data/plot/AxesTest.npz
deleted file mode 100644
index 8c87ed825..000000000
Binary files a/tests/control_data/graphical_units_data/plot/AxesTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/plot/PlotFunctions.npz b/tests/control_data/graphical_units_data/plot/PlotFunctions.npz
deleted file mode 100644
index 39cca75a6..000000000
Binary files a/tests/control_data/graphical_units_data/plot/PlotFunctions.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/plot/axes.npz b/tests/control_data/graphical_units_data/plot/axes.npz
new file mode 100644
index 000000000..7a5cc0cde
Binary files /dev/null and b/tests/control_data/graphical_units_data/plot/axes.npz differ
diff --git a/tests/control_data/graphical_units_data/polyhedra/Dodecahedron.npz b/tests/control_data/graphical_units_data/polyhedra/Dodecahedron.npz
new file mode 100644
index 000000000..4ad5cdc2a
Binary files /dev/null and b/tests/control_data/graphical_units_data/polyhedra/Dodecahedron.npz differ
diff --git a/tests/control_data/graphical_units_data/polyhedra/DodecahedronTest.npz b/tests/control_data/graphical_units_data/polyhedra/DodecahedronTest.npz
deleted file mode 100644
index 76dfe153b..000000000
Binary files a/tests/control_data/graphical_units_data/polyhedra/DodecahedronTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/polyhedra/Icosahedron.npz b/tests/control_data/graphical_units_data/polyhedra/Icosahedron.npz
new file mode 100644
index 000000000..d46cf664d
Binary files /dev/null and b/tests/control_data/graphical_units_data/polyhedra/Icosahedron.npz differ
diff --git a/tests/control_data/graphical_units_data/polyhedra/IcosahedronTest.npz b/tests/control_data/graphical_units_data/polyhedra/IcosahedronTest.npz
deleted file mode 100644
index facd196f7..000000000
Binary files a/tests/control_data/graphical_units_data/polyhedra/IcosahedronTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/polyhedra/Octahedron.npz b/tests/control_data/graphical_units_data/polyhedra/Octahedron.npz
new file mode 100644
index 000000000..417644aaa
Binary files /dev/null and b/tests/control_data/graphical_units_data/polyhedra/Octahedron.npz differ
diff --git a/tests/control_data/graphical_units_data/polyhedra/OctahedronTest.npz b/tests/control_data/graphical_units_data/polyhedra/OctahedronTest.npz
deleted file mode 100644
index 1256fedb6..000000000
Binary files a/tests/control_data/graphical_units_data/polyhedra/OctahedronTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/polyhedra/Tetrahedron.npz b/tests/control_data/graphical_units_data/polyhedra/Tetrahedron.npz
new file mode 100644
index 000000000..0e7f4da14
Binary files /dev/null and b/tests/control_data/graphical_units_data/polyhedra/Tetrahedron.npz differ
diff --git a/tests/control_data/graphical_units_data/polyhedra/TetrahedronTest.npz b/tests/control_data/graphical_units_data/polyhedra/TetrahedronTest.npz
deleted file mode 100644
index 8cdb56cf2..000000000
Binary files a/tests/control_data/graphical_units_data/polyhedra/TetrahedronTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/sample_scenes/BasicScene.npz b/tests/control_data/graphical_units_data/sample_scenes/BasicScene.npz
deleted file mode 100644
index 85ee31861..000000000
Binary files a/tests/control_data/graphical_units_data/sample_scenes/BasicScene.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/sample_scenes/BasicTex.npz b/tests/control_data/graphical_units_data/sample_scenes/BasicTex.npz
deleted file mode 100644
index 978084e59..000000000
Binary files a/tests/control_data/graphical_units_data/sample_scenes/BasicTex.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/sample_scenes/GeometryScene.npz b/tests/control_data/graphical_units_data/sample_scenes/GeometryScene.npz
deleted file mode 100644
index 6b2241107..000000000
Binary files a/tests/control_data/graphical_units_data/sample_scenes/GeometryScene.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/tabular/DecimalTabular.npz b/tests/control_data/graphical_units_data/tabular/DecimalTabular.npz
new file mode 100644
index 000000000..cf3d5cbd6
Binary files /dev/null and b/tests/control_data/graphical_units_data/tabular/DecimalTabular.npz differ
diff --git a/tests/control_data/graphical_units_data/tabular/DecimalTabularTest.npz b/tests/control_data/graphical_units_data/tabular/DecimalTabularTest.npz
deleted file mode 100644
index 7d4b31da5..000000000
Binary files a/tests/control_data/graphical_units_data/tabular/DecimalTabularTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/tabular/IntegerTabular.npz b/tests/control_data/graphical_units_data/tabular/IntegerTabular.npz
new file mode 100644
index 000000000..5fd75a0ca
Binary files /dev/null and b/tests/control_data/graphical_units_data/tabular/IntegerTabular.npz differ
diff --git a/tests/control_data/graphical_units_data/tabular/IntegerTabularTest.npz b/tests/control_data/graphical_units_data/tabular/IntegerTabularTest.npz
deleted file mode 100644
index b697901bc..000000000
Binary files a/tests/control_data/graphical_units_data/tabular/IntegerTabularTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/tabular/MathTabular.npz b/tests/control_data/graphical_units_data/tabular/MathTabular.npz
new file mode 100644
index 000000000..dce2ae8db
Binary files /dev/null and b/tests/control_data/graphical_units_data/tabular/MathTabular.npz differ
diff --git a/tests/control_data/graphical_units_data/tabular/MathTabularTest.npz b/tests/control_data/graphical_units_data/tabular/MathTabularTest.npz
deleted file mode 100644
index dbda51e00..000000000
Binary files a/tests/control_data/graphical_units_data/tabular/MathTabularTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/tabular/MobjectTabular.npz b/tests/control_data/graphical_units_data/tabular/MobjectTabular.npz
new file mode 100644
index 000000000..7662aa068
Binary files /dev/null and b/tests/control_data/graphical_units_data/tabular/MobjectTabular.npz differ
diff --git a/tests/control_data/graphical_units_data/tabular/MobjectTabularTest.npz b/tests/control_data/graphical_units_data/tabular/MobjectTabularTest.npz
deleted file mode 100644
index 6c7a44eb8..000000000
Binary files a/tests/control_data/graphical_units_data/tabular/MobjectTabularTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/tabular/TabularTest.npz b/tests/control_data/graphical_units_data/tabular/TabularTest.npz
deleted file mode 100644
index 96b331331..000000000
Binary files a/tests/control_data/graphical_units_data/tabular/TabularTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/tabular/tabular.npz b/tests/control_data/graphical_units_data/tabular/tabular.npz
new file mode 100644
index 000000000..008730faf
Binary files /dev/null and b/tests/control_data/graphical_units_data/tabular/tabular.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/AmbientCameraMove.npz b/tests/control_data/graphical_units_data/threed/AmbientCameraMove.npz
new file mode 100644
index 000000000..de51c5e18
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/AmbientCameraMove.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/AmbientCameraMoveTest.npz b/tests/control_data/graphical_units_data/threed/AmbientCameraMoveTest.npz
deleted file mode 100644
index b918d65ee..000000000
Binary files a/tests/control_data/graphical_units_data/threed/AmbientCameraMoveTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/Arrow3D.npz b/tests/control_data/graphical_units_data/threed/Arrow3D.npz
new file mode 100644
index 000000000..8a7b1171f
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/Arrow3D.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/Arrow3DTest.npz b/tests/control_data/graphical_units_data/threed/Arrow3DTest.npz
deleted file mode 100644
index d4a710aa9..000000000
Binary files a/tests/control_data/graphical_units_data/threed/Arrow3DTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/Axes.npz b/tests/control_data/graphical_units_data/threed/Axes.npz
new file mode 100644
index 000000000..8a4b21157
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/Axes.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/AxesTest.npz b/tests/control_data/graphical_units_data/threed/AxesTest.npz
deleted file mode 100644
index c219a448a..000000000
Binary files a/tests/control_data/graphical_units_data/threed/AxesTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/CameraMove.npz b/tests/control_data/graphical_units_data/threed/CameraMove.npz
new file mode 100644
index 000000000..c5013fcf7
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/CameraMove.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/CameraMoveAxes.npz b/tests/control_data/graphical_units_data/threed/CameraMoveAxes.npz
new file mode 100644
index 000000000..3c54acd68
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/CameraMoveAxes.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/CameraMoveTest.npz b/tests/control_data/graphical_units_data/threed/CameraMoveTest.npz
deleted file mode 100644
index 9624c629d..000000000
Binary files a/tests/control_data/graphical_units_data/threed/CameraMoveTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/Cone.npz b/tests/control_data/graphical_units_data/threed/Cone.npz
new file mode 100644
index 000000000..ede6e69ee
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/Cone.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/ConeTest.npz b/tests/control_data/graphical_units_data/threed/ConeTest.npz
deleted file mode 100644
index cc277a0bd..000000000
Binary files a/tests/control_data/graphical_units_data/threed/ConeTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/Cube.npz b/tests/control_data/graphical_units_data/threed/Cube.npz
new file mode 100644
index 000000000..83c8a2a35
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/Cube.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/CubeTest.npz b/tests/control_data/graphical_units_data/threed/CubeTest.npz
deleted file mode 100644
index a066a789c..000000000
Binary files a/tests/control_data/graphical_units_data/threed/CubeTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/Cylinder.npz b/tests/control_data/graphical_units_data/threed/Cylinder.npz
new file mode 100644
index 000000000..3ccda0eeb
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/Cylinder.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/CylinderTest.npz b/tests/control_data/graphical_units_data/threed/CylinderTest.npz
deleted file mode 100644
index 13d1eda80..000000000
Binary files a/tests/control_data/graphical_units_data/threed/CylinderTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/creation/FadeOutTest.npz b/tests/control_data/graphical_units_data/threed/Dot3D.npz
similarity index 72%
rename from tests/control_data/graphical_units_data/creation/FadeOutTest.npz
rename to tests/control_data/graphical_units_data/threed/Dot3D.npz
index f8eb0c53b..3db9daf0c 100644
Binary files a/tests/control_data/graphical_units_data/creation/FadeOutTest.npz and b/tests/control_data/graphical_units_data/threed/Dot3D.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/Dot3DTest.npz b/tests/control_data/graphical_units_data/threed/Dot3DTest.npz
deleted file mode 100644
index 04140b872..000000000
Binary files a/tests/control_data/graphical_units_data/threed/Dot3DTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/FixedInFrameMObjectTest.npz b/tests/control_data/graphical_units_data/threed/FixedInFrameMObjectTest.npz
deleted file mode 100644
index ba4b6057e..000000000
Binary files a/tests/control_data/graphical_units_data/threed/FixedInFrameMObjectTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/Line3D.npz b/tests/control_data/graphical_units_data/threed/Line3D.npz
new file mode 100644
index 000000000..7ab914227
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/Line3D.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/Line3DTest.npz b/tests/control_data/graphical_units_data/threed/Line3DTest.npz
deleted file mode 100644
index d47f535fa..000000000
Binary files a/tests/control_data/graphical_units_data/threed/Line3DTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/MovingVertices.npz b/tests/control_data/graphical_units_data/threed/MovingVertices.npz
new file mode 100644
index 000000000..c16082a38
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/MovingVertices.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/MovingVerticesTest.npz b/tests/control_data/graphical_units_data/threed/MovingVerticesTest.npz
deleted file mode 100644
index efb925556..000000000
Binary files a/tests/control_data/graphical_units_data/threed/MovingVerticesTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/Sphere.npz b/tests/control_data/graphical_units_data/threed/Sphere.npz
new file mode 100644
index 000000000..a06fc847d
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/Sphere.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/SphereTest.npz b/tests/control_data/graphical_units_data/threed/SphereTest.npz
deleted file mode 100644
index 1e5316426..000000000
Binary files a/tests/control_data/graphical_units_data/threed/SphereTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/SurfaceColorscale.npz b/tests/control_data/graphical_units_data/threed/SurfaceColorscale.npz
new file mode 100644
index 000000000..f4800f5e3
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/SurfaceColorscale.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/SurfaceColorscaleTest.npz b/tests/control_data/graphical_units_data/threed/SurfaceColorscaleTest.npz
deleted file mode 100644
index 2a7110a88..000000000
Binary files a/tests/control_data/graphical_units_data/threed/SurfaceColorscaleTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/threed/Torus.npz b/tests/control_data/graphical_units_data/threed/Torus.npz
new file mode 100644
index 000000000..d8a679322
Binary files /dev/null and b/tests/control_data/graphical_units_data/threed/Torus.npz differ
diff --git a/tests/control_data/graphical_units_data/threed/TorusTest.npz b/tests/control_data/graphical_units_data/threed/TorusTest.npz
deleted file mode 100644
index 5dded1569..000000000
Binary files a/tests/control_data/graphical_units_data/threed/TorusTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/AnimationBuilder.npz b/tests/control_data/graphical_units_data/transform/AnimationBuilder.npz
new file mode 100644
index 000000000..ac3eef3c1
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/AnimationBuilder.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/AnimationBuilderTest.npz b/tests/control_data/graphical_units_data/transform/AnimationBuilderTest.npz
deleted file mode 100644
index 04880d7cc..000000000
Binary files a/tests/control_data/graphical_units_data/transform/AnimationBuilderTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyComplexFunction.npz b/tests/control_data/graphical_units_data/transform/ApplyComplexFunction.npz
new file mode 100644
index 000000000..b0a7b6167
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/ApplyComplexFunction.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyComplexFunctionTest.npz b/tests/control_data/graphical_units_data/transform/ApplyComplexFunctionTest.npz
deleted file mode 100644
index 1706657f2..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ApplyComplexFunctionTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyFunction.npz b/tests/control_data/graphical_units_data/transform/ApplyFunction.npz
new file mode 100644
index 000000000..b957da88e
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/ApplyFunction.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyFunctionTest.npz b/tests/control_data/graphical_units_data/transform/ApplyFunctionTest.npz
deleted file mode 100644
index 9ddcb533d..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ApplyFunctionTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyMatrix.npz b/tests/control_data/graphical_units_data/transform/ApplyMatrix.npz
new file mode 100644
index 000000000..e1d0914e5
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/ApplyMatrix.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyMatrixTest.npz b/tests/control_data/graphical_units_data/transform/ApplyMatrixTest.npz
deleted file mode 100644
index 8a50b9dc6..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ApplyMatrixTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunction.npz b/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunction.npz
new file mode 100644
index 000000000..54192f9bd
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunction.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunctionTest.npz b/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunctionTest.npz
deleted file mode 100644
index f8eb0c53b..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ApplyPointwiseFunctionTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ClockwiseTransform.npz b/tests/control_data/graphical_units_data/transform/ClockwiseTransform.npz
new file mode 100644
index 000000000..61485d691
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/ClockwiseTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/ClockwiseTransformTest.npz b/tests/control_data/graphical_units_data/transform/ClockwiseTransformTest.npz
deleted file mode 100644
index 5622807c5..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ClockwiseTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/CounterclockwiseTransform.npz b/tests/control_data/graphical_units_data/transform/CounterclockwiseTransform.npz
new file mode 100644
index 000000000..a143c4d0a
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/CounterclockwiseTransform.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/CounterclockwiseTransformTest.npz b/tests/control_data/graphical_units_data/transform/CounterclockwiseTransformTest.npz
deleted file mode 100644
index 5622807c5..000000000
Binary files a/tests/control_data/graphical_units_data/transform/CounterclockwiseTransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/CyclicReplace.npz b/tests/control_data/graphical_units_data/transform/CyclicReplace.npz
new file mode 100644
index 000000000..cb93772e7
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/CyclicReplace.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/CyclicReplaceTest.npz b/tests/control_data/graphical_units_data/transform/CyclicReplaceTest.npz
deleted file mode 100644
index 0b953aeb8..000000000
Binary files a/tests/control_data/graphical_units_data/transform/CyclicReplaceTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/FadeInAndOut.npz b/tests/control_data/graphical_units_data/transform/FadeInAndOut.npz
new file mode 100644
index 000000000..1aae6976c
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/FadeInAndOut.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/FadeInAndOutTest.npz b/tests/control_data/graphical_units_data/transform/FadeInAndOutTest.npz
deleted file mode 100644
index 881f1fbcd..000000000
Binary files a/tests/control_data/graphical_units_data/transform/FadeInAndOutTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/FadeToColort.npz b/tests/control_data/graphical_units_data/transform/FadeToColort.npz
new file mode 100644
index 000000000..2c595b651
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/FadeToColort.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/FadeToColortTest.npz b/tests/control_data/graphical_units_data/transform/FadeToColortTest.npz
deleted file mode 100644
index 5fd21fb75..000000000
Binary files a/tests/control_data/graphical_units_data/transform/FadeToColortTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/MatchPointsScene.npz b/tests/control_data/graphical_units_data/transform/MatchPointsScene.npz
index 2e5ef8841..7e640bda0 100644
Binary files a/tests/control_data/graphical_units_data/transform/MatchPointsScene.npz and b/tests/control_data/graphical_units_data/transform/MatchPointsScene.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/MoveToTarget.npz b/tests/control_data/graphical_units_data/transform/MoveToTarget.npz
new file mode 100644
index 000000000..936f7b402
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/MoveToTarget.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/MoveToTargetTest.npz b/tests/control_data/graphical_units_data/transform/MoveToTargetTest.npz
deleted file mode 100644
index f0b46559e..000000000
Binary files a/tests/control_data/graphical_units_data/transform/MoveToTargetTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/Restore.npz b/tests/control_data/graphical_units_data/transform/Restore.npz
new file mode 100644
index 000000000..263fbba57
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/Restore.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/RestoreTest.npz b/tests/control_data/graphical_units_data/transform/RestoreTest.npz
deleted file mode 100644
index 5622807c5..000000000
Binary files a/tests/control_data/graphical_units_data/transform/RestoreTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ScaleInPlace.npz b/tests/control_data/graphical_units_data/transform/ScaleInPlace.npz
new file mode 100644
index 000000000..982ba2a63
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/ScaleInPlace.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/ScaleInPlaceTest.npz b/tests/control_data/graphical_units_data/transform/ScaleInPlaceTest.npz
deleted file mode 100644
index c981716fc..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ScaleInPlaceTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/ShrinkToCenter.npz b/tests/control_data/graphical_units_data/transform/ShrinkToCenter.npz
new file mode 100644
index 000000000..1deac9bfa
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/ShrinkToCenter.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/ShrinkToCenterTest.npz b/tests/control_data/graphical_units_data/transform/ShrinkToCenterTest.npz
deleted file mode 100644
index f8eb0c53b..000000000
Binary files a/tests/control_data/graphical_units_data/transform/ShrinkToCenterTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/Transform.npz b/tests/control_data/graphical_units_data/transform/Transform.npz
new file mode 100644
index 000000000..0d2293634
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/Transform.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/TransformFromCopy.npz b/tests/control_data/graphical_units_data/transform/TransformFromCopy.npz
new file mode 100644
index 000000000..0d2293634
Binary files /dev/null and b/tests/control_data/graphical_units_data/transform/TransformFromCopy.npz differ
diff --git a/tests/control_data/graphical_units_data/transform/TransformFromCopyTest.npz b/tests/control_data/graphical_units_data/transform/TransformFromCopyTest.npz
deleted file mode 100644
index 5622807c5..000000000
Binary files a/tests/control_data/graphical_units_data/transform/TransformFromCopyTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/transform/TransformTest.npz b/tests/control_data/graphical_units_data/transform/TransformTest.npz
deleted file mode 100644
index 5622807c5..000000000
Binary files a/tests/control_data/graphical_units_data/transform/TransformTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/updaters/LastFrameWhenCleared.npz b/tests/control_data/graphical_units_data/updaters/LastFrameWhenCleared.npz
new file mode 100644
index 000000000..00a07ff8d
Binary files /dev/null and b/tests/control_data/graphical_units_data/updaters/LastFrameWhenCleared.npz differ
diff --git a/tests/control_data/graphical_units_data/updaters/LastFrameWhenClearedTest.npz b/tests/control_data/graphical_units_data/updaters/LastFrameWhenClearedTest.npz
deleted file mode 100644
index 277bcc947..000000000
Binary files a/tests/control_data/graphical_units_data/updaters/LastFrameWhenClearedTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/updaters/UpdateSceneDuringAnimation.npz b/tests/control_data/graphical_units_data/updaters/UpdateSceneDuringAnimation.npz
new file mode 100644
index 000000000..1613809ec
Binary files /dev/null and b/tests/control_data/graphical_units_data/updaters/UpdateSceneDuringAnimation.npz differ
diff --git a/tests/control_data/graphical_units_data/updaters/UpdateSceneDuringAnimationTest.npz b/tests/control_data/graphical_units_data/updaters/UpdateSceneDuringAnimationTest.npz
deleted file mode 100644
index 59e78df02..000000000
Binary files a/tests/control_data/graphical_units_data/updaters/UpdateSceneDuringAnimationTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/updaters/Updater.npz b/tests/control_data/graphical_units_data/updaters/Updater.npz
new file mode 100644
index 000000000..ff24a3029
Binary files /dev/null and b/tests/control_data/graphical_units_data/updaters/Updater.npz differ
diff --git a/tests/control_data/graphical_units_data/updaters/UpdaterTest.npz b/tests/control_data/graphical_units_data/updaters/UpdaterTest.npz
deleted file mode 100644
index f0eba4e75..000000000
Binary files a/tests/control_data/graphical_units_data/updaters/UpdaterTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/updaters/ValueTracker.npz b/tests/control_data/graphical_units_data/updaters/ValueTracker.npz
new file mode 100644
index 000000000..6fe743b5a
Binary files /dev/null and b/tests/control_data/graphical_units_data/updaters/ValueTracker.npz differ
diff --git a/tests/control_data/graphical_units_data/updaters/ValueTrackerTest.npz b/tests/control_data/graphical_units_data/updaters/ValueTrackerTest.npz
deleted file mode 100644
index f7bed0705..000000000
Binary files a/tests/control_data/graphical_units_data/updaters/ValueTrackerTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/DarwinTexMobjectTest.npz b/tests/control_data/graphical_units_data/writing/DarwinTexMobjectTest.npz
deleted file mode 100644
index 131df64cc..000000000
Binary files a/tests/control_data/graphical_units_data/writing/DarwinTexMobjectTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/DarwinTextMobjectTest.npz b/tests/control_data/graphical_units_data/writing/DarwinTextMobjectTest.npz
deleted file mode 100644
index 0a3587e83..000000000
Binary files a/tests/control_data/graphical_units_data/writing/DarwinTextMobjectTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/DarwinTextTest.npz b/tests/control_data/graphical_units_data/writing/DarwinTextTest.npz
deleted file mode 100644
index 05c861d9e..000000000
Binary files a/tests/control_data/graphical_units_data/writing/DarwinTextTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/LinuxTexMobjectTest.npz b/tests/control_data/graphical_units_data/writing/LinuxTexMobjectTest.npz
deleted file mode 100644
index a5d33772f..000000000
Binary files a/tests/control_data/graphical_units_data/writing/LinuxTexMobjectTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/LinuxTextMobjectTest.npz b/tests/control_data/graphical_units_data/writing/LinuxTextMobjectTest.npz
deleted file mode 100644
index d5dc8b1fa..000000000
Binary files a/tests/control_data/graphical_units_data/writing/LinuxTextMobjectTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/LinuxTextTest.npz b/tests/control_data/graphical_units_data/writing/LinuxTextTest.npz
deleted file mode 100644
index 8d84013b6..000000000
Binary files a/tests/control_data/graphical_units_data/writing/LinuxTextTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/WindowsTexMobjectTest.npz b/tests/control_data/graphical_units_data/writing/WindowsTexMobjectTest.npz
deleted file mode 100644
index 131df64cc..000000000
Binary files a/tests/control_data/graphical_units_data/writing/WindowsTexMobjectTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/WindowsTextMobjectTest.npz b/tests/control_data/graphical_units_data/writing/WindowsTextMobjectTest.npz
deleted file mode 100644
index 0a3587e83..000000000
Binary files a/tests/control_data/graphical_units_data/writing/WindowsTextMobjectTest.npz and /dev/null differ
diff --git a/tests/control_data/graphical_units_data/writing/WindowsTextTest.npz b/tests/control_data/graphical_units_data/writing/WindowsTextTest.npz
deleted file mode 100644
index 087fc8b76..000000000
Binary files a/tests/control_data/graphical_units_data/writing/WindowsTextTest.npz and /dev/null differ
diff --git a/tests/test_graphical_units/test_axes.py b/tests/test_graphical_units/test_axes.py
index f8915379e..b469117fd 100644
--- a/tests/test_graphical_units/test_axes.py
+++ b/tests/test_graphical_units/test_axes.py
@@ -1,29 +1,18 @@
-import pytest
-
from manim import *
-
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class AxesTest(Scene):
- def construct(self):
- graph = Axes(
- x_range=[-10, 10, 1],
- y_range=[-10, 10, 1],
- x_length=6,
- y_length=6,
- color=WHITE,
- axis_config={"exclude_origin_tick": False},
- )
- labels = graph.get_axis_labels()
- self.add(graph, labels)
-
-
-MODULE_NAME = "plot"
-
-
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
+
+__module_test__ = "plot"
+
+
+@frames_comparison
+def test_axes(scene):
+ graph = Axes(
+ x_range=[-10, 10, 1],
+ y_range=[-10, 10, 1],
+ x_length=6,
+ y_length=6,
+ color=WHITE,
+ axis_config={"exclude_origin_tick": False},
+ )
+ labels = graph.get_axis_labels()
+ scene.add(graph, labels)
diff --git a/tests/test_graphical_units/test_brace.py b/tests/test_graphical_units/test_brace.py
index e23348490..884cef767 100644
--- a/tests/test_graphical_units/test_brace.py
+++ b/tests/test_graphical_units/test_brace.py
@@ -1,42 +1,31 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class BraceSharpnessTest(Scene):
- def construct(self):
- line = Line(LEFT * 3, RIGHT * 3).shift(UP * 4)
-
- for sharpness in [0, 0.25, 0.5, 0.75, 1, 2, 3, 5]:
- self.add(Brace(line, sharpness=sharpness))
- line.shift(DOWN)
- self.wait()
-
-
-class BraceTipTest(Scene):
- def construct(self):
- line = Line().shift(LEFT * 3).rotate(PI / 2)
- steps = 8
- for i in range(steps):
- brace = Brace(line, direction=line.copy().rotate(PI / 2).get_unit_vector())
- dot = Dot()
- brace.put_at_tip(dot)
- line.rotate_about_origin(TAU / steps)
- self.add(brace, dot)
- self.wait()
+__module_test__ = "brace"
-class ArcBraceTest(Scene):
- def construct(self):
- self.play(Animation(ArcBrace()))
+@frames_comparison
+def test_brace_sharpness(scene):
+ line = Line(LEFT * 3, RIGHT * 3).shift(UP * 4)
+ for sharpness in [0, 0.25, 0.5, 0.75, 1, 2, 3, 5]:
+ scene.add(Brace(line, sharpness=sharpness))
+ line.shift(DOWN)
+ scene.wait()
-MODULE_NAME = "brace"
+@frames_comparison
+def test_braceTip(scene):
+ line = Line().shift(LEFT * 3).rotate(PI / 2)
+ steps = 8
+ for i in range(steps):
+ brace = Brace(line, direction=line.copy().rotate(PI / 2).get_unit_vector())
+ dot = Dot()
+ brace.put_at_tip(dot)
+ line.rotate_about_origin(TAU / steps)
+ scene.add(brace, dot)
+ scene.wait()
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison
+def test_arcBrace(scene):
+ scene.play(Animation(ArcBrace()))
diff --git a/tests/test_graphical_units/test_coordinate_systems.py b/tests/test_graphical_units/test_coordinate_systems.py
index abe0549b5..53fb0b73f 100644
--- a/tests/test_graphical_units/test_coordinate_systems.py
+++ b/tests/test_graphical_units/test_coordinate_systems.py
@@ -1,28 +1,18 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class NumberPlaneTest(Scene):
- def construct(self):
- plane = NumberPlane(
- x_range=[-4, 6, 1],
- axis_config={"include_numbers": True},
- x_axis_config={"unit_size": 1.2},
- y_range=[-2, 5],
- y_length=6,
- y_axis_config={"label_direction": UL},
- )
-
- self.add(plane)
-
+__module_test__ = "coordinate_system"
-MODULE_NAME = "coordinate_systems"
+@frames_comparison
+def test_number_plane(scene):
+ plane = NumberPlane(
+ x_range=[-4, 6, 1],
+ axis_config={"include_numbers": True},
+ x_axis_config={"unit_size": 1.2},
+ y_range=[-2, 5],
+ y_length=6,
+ y_axis_config={"label_direction": UL},
+ )
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+ scene.add(plane)
diff --git a/tests/test_graphical_units/test_creation.py b/tests/test_graphical_units/test_creation.py
index 75d74073a..6c1a7e587 100644
--- a/tests/test_graphical_units/test_creation.py
+++ b/tests/test_graphical_units/test_creation.py
@@ -1,79 +1,67 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
+__module_test__ = "creation"
-class CreateTest(Scene):
- def construct(self):
- square = Square()
- self.play(Create(square))
+@frames_comparison(last_frame=False)
+def test_create(scene):
+ square = Square()
+ scene.play(Create(square))
-class UncreateTest(Scene):
- def construct(self):
- square = Square()
- self.add(square)
- self.play(Uncreate(square))
+@frames_comparison(last_frame=False)
+def test_uncreate(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(Uncreate(square))
-class DrawBorderThenFillTest(Scene):
- def construct(self):
- square = Square(fill_opacity=1)
- self.play(DrawBorderThenFill(square))
+@frames_comparison(last_frame=False)
+def test_DrawBorderThenFill(scene):
+ square = Square(fill_opacity=1)
+ scene.play(DrawBorderThenFill(square))
# NOTE : Here should be the Write Test. But for some reasons it appears that this function is untestable (see issue #157)
+@frames_comparison(last_frame=False)
+def test_FadeOut(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(FadeOut(square))
-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 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))
+@frames_comparison(last_frame=False)
+def test_FadeIn(scene):
+ square = Square()
+ scene.play(FadeIn(square))
-class GrowFromEdgeTest(Scene):
- def construct(self):
- square = Square()
- self.play(GrowFromEdge(square, DOWN))
+@frames_comparison(last_frame=False)
+def test_GrowFromPoint(scene):
+ square = Square()
+ scene.play(GrowFromPoint(square, np.array((1, 1, 0))))
-class SpinInFromNothingTest(Scene):
- def construct(self):
- square = Square()
- self.play(SpinInFromNothing(square))
+@frames_comparison(last_frame=False)
+def test_GrowFromCenter(scene):
+ square = Square()
+ scene.play(GrowFromCenter(square))
-class ShrinkToCenterTest(Scene):
- def construct(self):
- square = Square()
- self.play(ShrinkToCenter(square))
+@frames_comparison(last_frame=False)
+def test_GrowFromEdge(scene):
+ square = Square()
+ scene.play(GrowFromEdge(square, DOWN))
-MODULE_NAME = "creation"
+@frames_comparison(last_frame=False)
+def test_SpinInFromNothing(scene):
+ square = Square()
+ scene.play(SpinInFromNothing(square))
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison(last_frame=False)
+def test_ShrinkToCenter(scene):
+ square = Square()
+ scene.play(ShrinkToCenter(square))
diff --git a/tests/test_graphical_units/test_functions.py b/tests/test_graphical_units/test_functions.py
index ae02bac3f..63599d2a5 100644
--- a/tests/test_graphical_units/test_functions.py
+++ b/tests/test_graphical_units/test_functions.py
@@ -1,23 +1,10 @@
-import numpy as np
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class FunctionGraphTest(Scene):
- def construct(self):
- graph = FunctionGraph(
- lambda x: 2 * np.cos(0.5 * x), x_range=[-PI, PI], color=BLUE
- )
- self.add(graph)
-
-
-MODULE_NAME = "functions"
+__module_test__ = "functions"
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison
+def test_FunctionGraph(scene):
+ graph = FunctionGraph(lambda x: 2 * np.cos(0.5 * x), x_range=[-PI, PI], color=BLUE)
+ scene.add(graph)
diff --git a/tests/test_graphical_units/test_geometry.py b/tests/test_graphical_units/test_geometry.py
index c044a0729..1a362e72d 100644
--- a/tests/test_graphical_units/test_geometry.py
+++ b/tests/test_graphical_units/test_geometry.py
@@ -1,208 +1,196 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import 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.add(VGroup(*dots))
-
-
-class ArcTest(Scene):
- def construct(self):
- a = Arc(radius=1, start_angle=PI)
- self.add(a)
-
+__module_test__ = "geometry"
-class ArcBetweenPointsTest(Scene):
- def construct(self):
- a = ArcBetweenPoints(np.array([1, 1, 0]), np.array([2, 2, 0]))
- self.add(a)
+@frames_comparison(last_frame=True)
+def test_Coordinates(scene):
+ dots = [Dot(np.array([x, y, 0])) for x in range(-7, 8) for y in range(-4, 5)]
+ scene.add(VGroup(*dots))
-class CurvedArrowTest(Scene):
- def construct(self):
- a = CurvedArrow(np.array([1, 1, 0]), np.array([2, 2, 0]))
- self.add(a)
+@frames_comparison
+def test_Arc(scene):
+ a = Arc(radius=1, start_angle=PI)
+ scene.add(a)
-class CustomDoubleArrowTest(Scene):
- def construct(self):
- from manim.mobject.geometry import ArrowCircleTip, ArrowSquareFilledTip
- a = DoubleArrow(
- np.array([-1, -1, 0]),
- np.array([1, 1, 0]),
- tip_shape_start=ArrowCircleTip,
- tip_shape_end=ArrowSquareFilledTip,
- )
- self.add(a)
+@frames_comparison
+def test_ArcBetweenPoints(scene):
+ a = ArcBetweenPoints(np.array([1, 1, 0]), np.array([2, 2, 0]))
+ scene.add(a)
-class CircleTest(Scene):
- def construct(self):
- circle = Circle()
- self.add(circle)
+@frames_comparison
+def test_CurvedArrow(scene):
+ a = CurvedArrow(np.array([1, 1, 0]), np.array([2, 2, 0]))
+ scene.add(a)
-class CirclePointsTest(Scene):
- def construct(self):
- circle = Circle.from_three_points(LEFT, LEFT + UP, UP * 2)
- self.add(circle)
+@frames_comparison
+def test_CustomDoubleArrow(scene):
+ a = DoubleArrow(
+ np.array([-1, -1, 0]),
+ np.array([1, 1, 0]),
+ tip_shape_start=ArrowCircleTip,
+ tip_shape_end=ArrowSquareFilledTip,
+ )
+ scene.add(a)
-class DashedVMobjectTest(Scene):
- def construct(self):
- circle = DashedVMobject(Circle(), 12, 0.9)
- line = DashedLine(dash_length=0.5)
- self.add(circle, line)
+@frames_comparison
+def test_Circle(scene):
+ circle = Circle()
+ scene.add(circle)
-class DotTest(Scene):
- def construct(self):
- dot = Dot()
- self.add(dot)
+@frames_comparison
+def test_CirclePoints(scene):
+ circle = Circle.from_three_points(LEFT, LEFT + UP, UP * 2)
+ scene.add(circle)
-class AnnotationDotTest(Scene):
- def construct(self):
- adot = AnnotationDot()
- self.add(adot)
+@frames_comparison
+def test_Dot(scene):
+ dot = Dot()
+ scene.add(dot)
-class EllipseTest(Scene):
- def construct(self):
- e = Ellipse()
- self.add(e)
+@frames_comparison
+def test_DashedVMobject(scene):
+ circle = DashedVMobject(Circle(), 12, 0.9)
+ line = DashedLine(dash_length=0.5)
+ scene.add(circle, line)
-class SectorTest(Scene):
- def construct(self):
- e = Sector()
- self.add(e)
+@frames_comparison
+def test_AnnotationDot(scene):
+ adot = AnnotationDot()
+ scene.add(adot)
-class AnnulusTest(Scene):
- def construct(self):
- a = Annulus()
- self.add(a)
+@frames_comparison
+def test_Ellipse(scene):
+ e = Ellipse()
+ scene.add(e)
-class AnnularSectorTest(Scene):
- def construct(self):
- a = AnnularSector()
- self.add(a)
+@frames_comparison
+def test_Sector(scene):
+ e = Sector()
+ scene.add(e)
-class LineTest(Scene):
- def construct(self):
- a = Line(np.array([1, 1, 0]), np.array([2, 2, 0]))
- self.add(a)
+@frames_comparison
+def test_Annulus(scene):
+ a = Annulus()
+ scene.add(a)
-class ElbowTest(Scene):
- def construct(self):
- a = Elbow()
- self.add(a)
+@frames_comparison
+def test_AnnularSector(scene):
+ a = AnnularSector()
+ scene.add(a)
-class DoubleArrowTest(Scene):
- def construct(self):
- a = DoubleArrow()
- self.add(a)
+@frames_comparison
+def test_Line(scene):
+ a = Line(np.array([1, 1, 0]), np.array([2, 2, 0]))
+ scene.add(a)
-class VectorTest(Scene):
- def construct(self):
- a = Vector(UP)
- self.add(a)
+@frames_comparison
+def test_Elbow(scene):
+ a = Elbow()
+ scene.add(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.add(a)
+@frames_comparison
+def test_DoubleArrow(scene):
+ a = DoubleArrow()
+ scene.add(a)
-class RectangleTest(Scene):
- def construct(self):
- a = Rectangle()
- self.add(a)
+@frames_comparison
+def test_Vector(scene):
+ a = Vector(UP)
+ scene.add(a)
-class RoundedRectangleTest(Scene):
- def construct(self):
- a = RoundedRectangle()
- self.add(a)
+@frames_comparison
+def test_Polygon(scene):
+ a = Polygon(*[np.array([1, 1, 0]), np.array([2, 2, 0]), np.array([2, 3, 0])])
+ scene.add(a)
-class ArrangeTest(Scene):
- def construct(self):
- s1 = Square()
- s2 = Square()
- x = VGroup(s1, s2).set_x(0).arrange(buff=1.4)
- self.add(x)
+@frames_comparison
+def test_Rectangle(scene):
+ a = Rectangle()
+ scene.add(a)
-class ZIndexTest(Scene):
- def construct(self):
- circle = Circle().set_fill(RED, opacity=1)
- square = Square(side_length=1.7).set_fill(BLUE, opacity=1)
- triangle = Triangle().set_fill(GREEN, opacity=1)
- square.z_index = 0
- triangle.z_index = 1
- circle.z_index = 2
+@frames_comparison
+def test_RoundedRectangle(scene):
+ a = RoundedRectangle()
+ scene.add(a)
- self.play(FadeIn(VGroup(circle, square, triangle)))
- self.play(ApplyMethod(circle.shift, UP))
- self.play(ApplyMethod(triangle.shift, 2 * UP))
+@frames_comparison
+def test_Arrange(scene):
+ s1 = Square()
+ s2 = Square()
+ x = VGroup(s1, s2).set_x(0).arrange(buff=1.4)
+ scene.add(x)
-class AngleTest(Scene):
- def construct(self):
- l1 = Line(ORIGIN, RIGHT)
- l2 = Line(ORIGIN, UP)
- a = Angle(l1, l2)
- self.add(a)
+@frames_comparison(last_frame=False)
+def test_ZIndex(scene):
+ circle = Circle().set_fill(RED, opacity=1)
+ square = Square(side_length=1.7).set_fill(BLUE, opacity=1)
+ triangle = Triangle().set_fill(GREEN, opacity=1)
+ square.z_index = 0
+ triangle.z_index = 1
+ circle.z_index = 2
-class RightAngleTest(Scene):
- def construct(self):
- l1 = Line(ORIGIN, RIGHT)
- l2 = Line(ORIGIN, UP)
- a = RightAngle(l1, l2)
- self.add(a)
+ scene.play(FadeIn(VGroup(circle, square, triangle)))
+ scene.play(ApplyMethod(circle.shift, UP))
+ scene.play(ApplyMethod(triangle.shift, 2 * UP))
-class PolygramTest(Scene):
- def construct(self):
- hexagram = Polygram(
- [[0, 2, 0], [-np.sqrt(3), -1, 0], [np.sqrt(3), -1, 0]],
- [[-np.sqrt(3), 1, 0], [0, -2, 0], [np.sqrt(3), 1, 0]],
- )
- self.add(hexagram)
+@frames_comparison
+def test_Angle(scene):
+ l1 = Line(ORIGIN, RIGHT)
+ l2 = Line(ORIGIN, UP)
+ a = Angle(l1, l2)
+ scene.add(a)
-class RegularPolygramTest(Scene):
- def construct(self):
- pentagram = RegularPolygram(5, radius=2)
- octagram = RegularPolygram(8, radius=2)
- self.add(VGroup(pentagram, octagram).arrange(RIGHT))
+@frames_comparison
+def test_RightAngle(scene):
+ l1 = Line(ORIGIN, RIGHT)
+ l2 = Line(ORIGIN, UP)
+ a = RightAngle(l1, l2)
+ scene.add(a)
-class StarTest(Scene):
- def construct(self):
- star = Star(outer_radius=2)
- self.add(star)
+@frames_comparison
+def test_Polygram(scene):
+ hexagram = Polygram(
+ [[0, 2, 0], [-np.sqrt(3), -1, 0], [np.sqrt(3), -1, 0]],
+ [[-np.sqrt(3), 1, 0], [0, -2, 0], [np.sqrt(3), 1, 0]],
+ )
+ scene.add(hexagram)
-MODULE_NAME = "geometry"
+@frames_comparison
+def test_RegularPolygram(scene):
+ pentagram = RegularPolygram(5, radius=2)
+ octagram = RegularPolygram(8, radius=2)
+ scene.add(VGroup(pentagram, octagram).arrange(RIGHT))
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison
+def test_Star(scene):
+ star = Star(outer_radius=2)
+ scene.add(star)
diff --git a/tests/test_graphical_units/test_graphscene.py b/tests/test_graphical_units/test_graphscene.py
index 4e7f9ea8c..124801a24 100644
--- a/tests/test_graphical_units/test_graphscene.py
+++ b/tests/test_graphical_units/test_graphscene.py
@@ -1,38 +1,16 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class PlotFunctions(GraphScene):
- def __init__(self, **kwargs):
- GraphScene.__init__(
- self,
- graph_origin=ORIGIN,
- axes_color=GREEN,
- x_labeled_nums=range(-10, 12, 2),
- **kwargs
- )
-
- def construct(self):
- self.x_min = -10
- self.x_max = 10.3
- self.y_min = -1.5
- self.y_max = 1.5
-
- constants.TEX_TEMPLATE = TexTemplate()
- self.setup_axes()
- f = self.get_graph(lambda x: x ** 2)
-
- self.add(f)
-
-
-MODULE_NAME = "plot"
+__module_test__ = "graphscene"
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison(base_scene=GraphScene)
+def test_PlotFunctions(scene):
+ scene.x_min = -10
+ scene.x_max = 10.3
+ scene.y_min = -1.5
+ scene.y_max = 1.5
+ constants.TEX_TEMPLATE = TexTemplate()
+ scene.setup_axes()
+ f = scene.get_graph(lambda x: x ** 2)
+ scene.add(f)
diff --git a/tests/test_graphical_units/test_img_and_svg.py b/tests/test_graphical_units/test_img_and_svg.py
index ab7dfafd9..0a89b4e09 100644
--- a/tests/test_graphical_units/test_img_and_svg.py
+++ b/tests/test_graphical_units/test_img_and_svg.py
@@ -1,14 +1,9 @@
-import sys
-from pathlib import Path
-
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
+
+from ..helpers.path_utils import get_svg_resource
-from ..helpers.graphical_units import set_test_scene
-from ..helpers.path_utils import get_project_root, get_svg_resource
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
+__module_test__ = "img_and_svg"
# Tests break down into two kinds: one where the SVG is simple enough to step through
# and ones where the SVG is realistically complex, and the output should be visually inspected.
@@ -16,279 +11,263 @@ from ..utils.testing_utils import get_scenes_to_test
# First are the simple tests.
-class LineTest(Scene):
- def construct(self):
- line_demo = SVGMobject(get_svg_resource("line.svg"))
- self.add(line_demo)
- self.wait()
-
-
-class CubicPathTest(Scene):
- def construct(self):
- cubic_demo = SVGMobject(get_svg_resource("cubic_demo.svg"))
- self.add(cubic_demo)
- self.wait()
-
+@frames_comparison
+def test_Line(scene):
+ line_demo = SVGMobject(get_svg_resource("line.svg"))
+ scene.add(line_demo)
+ scene.wait()
-class CubicAndLinetoTest(Scene):
- def construct(self):
- cubic_lineto = SVGMobject(get_svg_resource("cubic_and_lineto.svg"))
- self.add(cubic_lineto)
- self.wait()
+@frames_comparison
+def test_CubicPath(scene):
+ cubic_demo = SVGMobject(get_svg_resource("cubic_demo.svg"))
+ scene.add(cubic_demo)
+ scene.wait()
-class RhomboidTest(Scene):
- """Test the default fill and parsed stroke of a rhomboid"""
- def construct(self):
- rhomboid = SVGMobject(get_svg_resource("rhomboid.svg")).scale(0.5)
- rhomboid_fill = rhomboid.copy().set_fill(opacity=1).shift(UP * 2)
- rhomboid_no_fill = rhomboid.copy().set_fill(opacity=0).shift(DOWN * 2)
+@frames_comparison
+def test_CubicAndLineto(scene):
+ cubic_lineto = SVGMobject(get_svg_resource("cubic_and_lineto.svg"))
+ scene.add(cubic_lineto)
+ scene.wait()
- self.add(rhomboid, rhomboid_fill, rhomboid_no_fill)
- self.wait()
+@frames_comparison
+def test_Rhomboid(scene):
+ rhomboid = SVGMobject(get_svg_resource("rhomboid.svg")).scale(0.5)
+ rhomboid_fill = rhomboid.copy().set_fill(opacity=1).shift(UP * 2)
+ rhomboid_no_fill = rhomboid.copy().set_fill(opacity=0).shift(DOWN * 2)
+ scene.add(rhomboid, rhomboid_fill, rhomboid_no_fill)
+ scene.wait()
-class InheritanceTest(Scene):
- """Ensure SVG inheritance is followed"""
- def construct(self):
- three_arrows = SVGMobject(get_svg_resource("inheritance_test.svg")).scale(0.5)
- self.add(three_arrows)
- self.wait()
+@frames_comparison
+def test_Inheritance(scene):
+ three_arrows = SVGMobject(get_svg_resource("inheritance_test.svg")).scale(0.5)
+ scene.add(three_arrows)
+ scene.wait()
-class MultiPartPathTest(Scene):
- def construct(self):
- mpp = SVGMobject(get_svg_resource("multi_part_path.svg"))
- self.add(mpp)
- self.wait()
+@frames_comparison
+def test_MultiPartPath(scene):
+ mpp = SVGMobject(get_svg_resource("multi_part_path.svg"))
+ scene.add(mpp)
+ scene.wait()
-class QuadraticPathTest(Scene):
- def construct(self):
- quad = SVGMobject(get_svg_resource("qcurve_demo.svg"))
- self.add(quad)
- self.wait()
+@frames_comparison
+def test_QuadraticPath(scene):
+ quad = SVGMobject(get_svg_resource("qcurve_demo.svg"))
+ scene.add(quad)
+ scene.wait()
-class SmoothCurvesTest(Scene):
- def construct(self):
- smooths = SVGMobject(get_svg_resource("smooth_curves.svg"))
- self.add(smooths)
- self.wait()
+@frames_comparison
+def test_SmoothCurves(scene):
+ smooths = SVGMobject(get_svg_resource("smooth_curves.svg"))
+ scene.add(smooths)
+ scene.wait()
-class WatchTheDecimals(Scene):
- def construct(self):
+@frames_comparison
+def test_WatchTheDecimals(scene):
+ def construct(scene):
decimal = SVGMobject(get_svg_resource("watch_the_decimals.svg"))
- self.add(decimal)
- self.wait()
+ scene.add(decimal)
+ scene.wait()
-class UseTagInheritanceTest(Scene):
- def construct(self):
- aabbb = SVGMobject(get_svg_resource("aabbb.svg"))
- self.add(aabbb)
- self.wait()
+@frames_comparison
+def test_UseTagInheritance(scene):
+ aabbb = SVGMobject(get_svg_resource("aabbb.svg"))
+ scene.add(aabbb)
+ scene.wait()
-class HalfEllipseTest(Scene):
- def construct(self):
- half_ellipse = SVGMobject(get_svg_resource("half_ellipse.svg"))
- self.add(half_ellipse)
- self.wait()
+@frames_comparison
+def test_HalfEllipse(scene):
+ half_ellipse = SVGMobject(get_svg_resource("half_ellipse.svg"))
+ scene.add(half_ellipse)
+ scene.wait()
-class HeartTest(Scene):
- def construct(self):
- heart = SVGMobject(get_svg_resource("heart.svg"))
- self.add(heart)
- self.wait()
+@frames_comparison
+def test_Heart(scene):
+ heart = SVGMobject(get_svg_resource("heart.svg"))
+ scene.add(heart)
+ scene.wait()
-class Arcs01Test(Scene):
+@frames_comparison
+def test_Arcs01(scene):
# See: https://www.w3.org/TR/SVG11/images/paths/arcs01.svg
- def construct(self):
- arcs = SVGMobject(get_svg_resource("arcs01.svg"))
- self.add(arcs)
- self.wait()
+ arcs = SVGMobject(get_svg_resource("arcs01.svg"))
+ scene.add(arcs)
+ scene.wait()
-class Arcs02Test(Scene):
+@frames_comparison(last_frame=False)
+def test_Arcs02(scene):
# See: https://www.w3.org/TR/SVG11/images/paths/arcs02.svg
- def construct(self):
- arcs = SVGMobject(get_svg_resource("arcs02.svg"))
- self.add(arcs)
- self.wait()
+ arcs = SVGMobject(get_svg_resource("arcs02.svg"))
+ scene.add(arcs)
+ scene.wait()
# Second are the visual tests - these are probably too complex to verify step-by-step, so
# these are really more of a spot-check
-class WeightSVGTest(Scene):
- def construct(self):
- path = get_svg_resource("weight.svg")
- svg_obj = SVGMobject(path)
- self.add(svg_obj)
- self.wait()
-
-
-class BrachistochroneCurveTest(Scene):
- def construct(self):
- brach_curve = SVGMobject(get_svg_resource("curve.svg"))
- self.add(brach_curve)
- self.wait()
-
-
-class DesmosGraph1Test(Scene):
- def construct(self):
- dgraph = SVGMobject(get_svg_resource("desmos-graph_1.svg")).scale(3)
- self.add(dgraph)
- self.wait()
-
-
-class PenroseTest(Scene):
- def construct(self):
- penrose = SVGMobject(get_svg_resource("penrose.svg"))
- self.add(penrose)
- self.wait()
+@frames_comparison(last_frame=False)
+def test_WeightSVG(scene):
+ path = get_svg_resource("weight.svg")
+ svg_obj = SVGMobject(path)
+ scene.add(svg_obj)
+ scene.wait()
-class ManimLogoTest(Scene):
- def construct(self):
- background_rect = Rectangle(color=WHITE, fill_opacity=1).scale(2)
- manim_logo = SVGMobject(get_svg_resource("manim-logo-sidebar.svg"))
- self.add(background_rect, manim_logo)
- self.wait()
+@frames_comparison
+def test_BrachistochroneCurve(scene):
+ brach_curve = SVGMobject(get_svg_resource("curve.svg"))
+ scene.add(brach_curve)
+ scene.wait()
-class UKFlagTest(Scene):
- def construct(self):
- uk_flag = SVGMobject(get_svg_resource("united-kingdom.svg"))
- self.add(uk_flag)
- self.wait()
+@frames_comparison
+def test_DesmosGraph1(scene):
+ dgraph = SVGMobject(get_svg_resource("desmos-graph_1.svg")).scale(3)
+ scene.add(dgraph)
+ scene.wait()
-class SingleUSStateTest(Scene):
- def construct(self):
- single_state = SVGMobject(get_svg_resource("single_state.svg"))
- self.add(single_state)
- self.wait()
+@frames_comparison
+def test_Penrose(scene):
+ penrose = SVGMobject(get_svg_resource("penrose.svg"))
+ scene.add(penrose)
+ scene.wait()
-class ContiguousUSMapTest(Scene):
- def construct(self):
- states = SVGMobject(get_svg_resource("states_map.svg")).scale(3)
- self.add(states)
- self.wait()
+@frames_comparison
+def test_ManimLogo(scene):
+ background_rect = Rectangle(color=WHITE, fill_opacity=1).scale(2)
+ manim_logo = SVGMobject(get_svg_resource("manim-logo-sidebar.svg"))
+ scene.add(background_rect, manim_logo)
+ scene.wait()
-class PixelizedTextTest(Scene):
- def construct(self):
- background_rect = Rectangle(color=WHITE, fill_opacity=1).scale(2)
- rgb_svg = SVGMobject(get_svg_resource("pixelated_text.svg"))
- self.add(background_rect, rgb_svg)
- self.wait()
+@frames_comparison
+def test_UKFlag(scene):
+ uk_flag = SVGMobject(get_svg_resource("united-kingdom.svg"))
+ scene.add(uk_flag)
+ scene.wait()
-class VideoIconTest(Scene):
- def construct(self):
- video_icon = SVGMobject(get_svg_resource("video_icon.svg"))
- self.add(video_icon)
- self.wait()
+@frames_comparison
+def test_SingleUSState(scene):
+ single_state = SVGMobject(get_svg_resource("single_state.svg"))
+ scene.add(single_state)
+ scene.wait()
-class MultipleTransformTest(Scene):
- def construct(self):
- svg_obj = SVGMobject(get_svg_resource("multiple_transforms.svg"))
- self.add(svg_obj)
- self.wait()
+@frames_comparison
+def test_ContiguousUSMap(scene):
+ states = SVGMobject(get_svg_resource("states_map.svg")).scale(3)
+ scene.add(states)
+ scene.wait()
-class MatrixTransformTest(Scene):
- def construct(self):
- svg_obj = SVGMobject(get_svg_resource("matrix.svg"))
- self.add(svg_obj)
- self.wait()
+@frames_comparison
+def test_PixelizedText(scene):
+ background_rect = Rectangle(color=WHITE, fill_opacity=1).scale(2)
+ rgb_svg = SVGMobject(get_svg_resource("pixelated_text.svg"))
+ scene.add(background_rect, rgb_svg)
+ scene.wait()
-class ScaleTransformTest(Scene):
- def construct(self):
- svg_obj = SVGMobject(get_svg_resource("scale.svg"))
- self.add(svg_obj)
- self.wait()
+@frames_comparison
+def test_VideoIcon(scene):
+ video_icon = SVGMobject(get_svg_resource("video_icon.svg"))
+ scene.add(video_icon)
+ scene.wait()
-class TranslateTransformTest(Scene):
- def construct(self):
- svg_obj = SVGMobject(get_svg_resource("translate.svg"))
- self.add(svg_obj)
- self.wait()
+@frames_comparison
+def test_MultipleTransform(scene):
+ svg_obj = SVGMobject(get_svg_resource("multiple_transforms.svg"))
+ scene.add(svg_obj)
+ scene.wait()
-class SkewXTransformTest(Scene):
- def construct(self):
- svg_obj = SVGMobject(get_svg_resource("skewX.svg"))
- self.add(svg_obj)
- self.wait()
+@frames_comparison
+def test_MatrixTransform(scene):
+ svg_obj = SVGMobject(get_svg_resource("matrix.svg"))
+ scene.add(svg_obj)
+ scene.wait()
-class SkewYTransformTest(Scene):
- def construct(self):
- svg_obj = SVGMobject(get_svg_resource("skewY.svg"))
- self.add(svg_obj)
- self.wait()
+@frames_comparison
+def test_ScaleTransform(scene):
+ svg_obj = SVGMobject(get_svg_resource("scale.svg"))
+ scene.add(svg_obj)
+ scene.wait()
-class RotateTransformTest(Scene):
- def construct(self):
- svg_obj = SVGMobject(get_svg_resource("rotate.svg"))
- self.add(svg_obj)
- self.wait()
+@frames_comparison
+def test_TranslateTransform(scene):
+ svg_obj = SVGMobject(get_svg_resource("translate.svg"))
+ scene.add(svg_obj)
+ scene.wait()
-class ImageMobjectTest(Scene):
- def construct(self):
- file_path = get_svg_resource("tree_img_640x351.png")
+@frames_comparison
+def test_SkewXTransform(scene):
+ svg_obj = SVGMobject(get_svg_resource("skewX.svg"))
+ scene.add(svg_obj)
+ scene.wait()
- im1 = ImageMobject(file_path).shift(4 * LEFT + UP)
- im2 = ImageMobject(file_path, scale_to_resolution=1080).shift(
- 4 * LEFT + 2 * DOWN
- )
- im3 = ImageMobject(file_path, scale_to_resolution=540).shift(4 * RIGHT)
- self.add(im1, im2, im3)
- self.wait(1)
+@frames_comparison
+def test_SkewYTransform(scene):
+ svg_obj = SVGMobject(get_svg_resource("skewY.svg"))
+ scene.add(svg_obj)
+ scene.wait()
-class ImageInterpolationTest(Scene):
- def construct(self):
- img = ImageMobject(
- np.uint8([[63, 0, 0, 0], [0, 127, 0, 0], [0, 0, 191, 0], [0, 0, 0, 255]])
- )
- img.height = 2
- img1 = img.copy()
- img2 = img.copy()
- img3 = img.copy()
- img4 = img.copy()
- img5 = img.copy()
+@frames_comparison
+def test_RotateTransform(scene):
+ svg_obj = SVGMobject(get_svg_resource("rotate.svg"))
+ scene.add(svg_obj)
+ scene.wait()
- img1.set_resampling_algorithm(RESAMPLING_ALGORITHMS["nearest"])
- img2.set_resampling_algorithm(RESAMPLING_ALGORITHMS["lanczos"])
- img3.set_resampling_algorithm(RESAMPLING_ALGORITHMS["linear"])
- img4.set_resampling_algorithm(RESAMPLING_ALGORITHMS["cubic"])
- img5.set_resampling_algorithm(RESAMPLING_ALGORITHMS["box"])
- self.add(img1, img2, img3, img4, img5)
- [s.shift(4 * LEFT + pos * 2 * RIGHT) for pos, s in enumerate(self.mobjects)]
- self.wait()
+@frames_comparison
+def test_ImageMobject(scene):
+ file_path = get_svg_resource("tree_img_640x351.png")
+ im1 = ImageMobject(file_path).shift(4 * LEFT + UP)
+ im2 = ImageMobject(file_path, scale_to_resolution=1080).shift(4 * LEFT + 2 * DOWN)
+ im3 = ImageMobject(file_path, scale_to_resolution=540).shift(4 * RIGHT)
+ scene.add(im1, im2, im3)
+ scene.wait(1)
-MODULE_NAME = "img_and_svg"
+@frames_comparison
+def test_ImageInterpolation(scene):
+ img = ImageMobject(
+ np.uint8([[63, 0, 0, 0], [0, 127, 0, 0], [0, 0, 191, 0], [0, 0, 0, 255]])
+ )
+ img.height = 2
+ img1 = img.copy()
+ img2 = img.copy()
+ img3 = img.copy()
+ img4 = img.copy()
+ img5 = img.copy()
+ img1.set_resampling_algorithm(RESAMPLING_ALGORITHMS["nearest"])
+ img2.set_resampling_algorithm(RESAMPLING_ALGORITHMS["lanczos"])
+ img3.set_resampling_algorithm(RESAMPLING_ALGORITHMS["linear"])
+ img4.set_resampling_algorithm(RESAMPLING_ALGORITHMS["cubic"])
+ img5.set_resampling_algorithm(RESAMPLING_ALGORITHMS["box"])
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+ scene.add(img1, img2, img3, img4, img5)
+ [s.shift(4 * LEFT + pos * 2 * RIGHT) for pos, s in enumerate(scene.mobjects)]
+ scene.wait()
diff --git a/tests/test_graphical_units/test_indication.py b/tests/test_graphical_units/test_indication.py
index d0b93c35b..7af5d351b 100644
--- a/tests/test_graphical_units/test_indication.py
+++ b/tests/test_graphical_units/test_indication.py
@@ -1,71 +1,61 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import 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.add(square)
- self.play(Indicate(square))
+__module_test__ = "indication"
-class FlashTest(Scene):
- def construct(self):
- square = Square()
- self.add(square)
- self.play(Flash(ORIGIN))
+@frames_comparison(last_frame=False)
+def test_FocusOn(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(FocusOn(square))
-class CircumscribeTest(Scene):
- def construct(self):
- square = Square()
- self.add(square)
- self.play(Circumscribe(square))
- self.wait()
+@frames_comparison(last_frame=False)
+def test_Indicate(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(Indicate(square))
-class ShowPassingFlashTest(Scene):
- def construct(self):
- square = Square()
- self.add(square)
- self.play(ShowPassingFlash(square.copy()))
+@frames_comparison(last_frame=False)
+def test_Flash(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(Flash(ORIGIN))
-class ShowCreationThenFadeOutTest(Scene):
- def construct(self):
- square = Square()
- self.add(square)
- self.play(ShowCreationThenFadeOut(square.copy()))
+@frames_comparison(last_frame=False)
+def test_Circumscribe(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(Circumscribe(square))
+ scene.wait()
-class ApplyWaveTest(Scene):
- def construct(self):
- square = Square()
- self.add(square)
- self.play(ApplyWave(square))
+@frames_comparison(last_frame=False)
+def test_ShowPassingFlash(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(ShowPassingFlash(square.copy()))
-class WiggleTest(Scene):
- def construct(self):
- square = Square()
- self.add(square)
- self.play(Wiggle(square))
+@frames_comparison(last_frame=False)
+def test_ShowCreationThenFadeOut(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(ShowCreationThenFadeOut(square.copy()))
-MODULE_NAME = "indication"
+@frames_comparison(last_frame=False)
+def test_ApplyWave(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(ApplyWave(square))
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison(last_frame=False)
+def test_Wiggle(scene):
+ square = Square()
+ scene.add(square)
+ scene.play(Wiggle(square))
diff --git a/tests/test_graphical_units/test_mobjects.py b/tests/test_graphical_units/test_mobjects.py
index e855d9faa..4ef82bde3 100644
--- a/tests/test_graphical_units/test_mobjects.py
+++ b/tests/test_graphical_units/test_mobjects.py
@@ -1,20 +1,10 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class PointCloudDotTest(ThreeDScene):
- def construct(self):
- p = PointCloudDot()
- self.add(p)
-
-
-MODULE_NAME = "mobjects"
+__module_test__ = "mobjects"
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison(base_scene=ThreeDScene)
+def test_PointCloudDot(scene):
+ p = PointCloudDot()
+ scene.add(p)
diff --git a/tests/test_graphical_units/test_modifier_methods.py b/tests/test_graphical_units/test_modifier_methods.py
index 7a475a4cf..22f8044bd 100644
--- a/tests/test_graphical_units/test_modifier_methods.py
+++ b/tests/test_graphical_units/test_modifier_methods.py
@@ -1,26 +1,16 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class GradientTest(Scene):
- def construct(self):
- c = Circle(fill_opacity=1).set_color(color=[YELLOW, GREEN])
- self.add(c)
-
-
-class GradientRotationTest(Scene):
- def construct(self):
- c = Circle(fill_opacity=1).set_color(color=[YELLOW, GREEN]).rotate(PI)
- self.add(c)
+__module_test__ = "modifier_methods"
-MODULE_NAME = "modifier_methods"
+@frames_comparison
+def test_Gradient(scene):
+ c = Circle(fill_opacity=1).set_color(color=[YELLOW, GREEN])
+ scene.add(c)
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison
+def test_GradientRotation(scene):
+ c = Circle(fill_opacity=1).set_color(color=[YELLOW, GREEN]).rotate(PI)
+ scene.add(c)
diff --git a/tests/test_graphical_units/test_movements.py b/tests/test_graphical_units/test_movements.py
index a1a83e34d..9aed085be 100644
--- a/tests/test_graphical_units/test_movements.py
+++ b/tests/test_graphical_units/test_movements.py
@@ -1,61 +1,51 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class HomotopyTest(Scene):
- def construct(self):
- def func(x, y, z, t):
- norm = np.linalg.norm([x, y])
- tau = interpolate(5, -5, t) + norm / config["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))
-
+__module_test__ = "movements"
-class PhaseFlowTest(Scene):
- def construct(self):
- square = Square()
- def func(t):
- return t * 0.5 * UP
+@frames_comparison(last_frame=False)
+def test_Homotopy(scene):
+ def func(x, y, z, t):
+ norm = np.linalg.norm([x, y])
+ tau = interpolate(5, -5, t) + norm / config["frame_x_radius"]
+ alpha = sigmoid(tau)
+ return [x, y + 0.5 * np.sin(2 * np.pi * alpha) - t * SMALL_BUFF / 2, z]
- self.play(PhaseFlow(func, square))
+ square = Square()
+ scene.play(Homotopy(func, square))
-class MoveAlongPathTest(Scene):
- def construct(self):
- square = Square()
- dot = Dot()
- self.play(MoveAlongPath(dot, square))
+@frames_comparison(last_frame=False)
+def test_PhaseFlow(scene):
+ square = Square()
+ def func(t):
+ return t * 0.5 * UP
-class RotateTest(Scene):
- def construct(self):
- square = Square()
- self.play(Rotate(square, PI))
+ scene.play(PhaseFlow(func, square))
-class MoveToTest(Scene):
- def construct(self):
- square = Square()
- self.play(square.animate.move_to(np.array([1.0, 1.0, 0.0])))
+@frames_comparison(last_frame=False)
+def test_MoveAlongPath(scene):
+ square = Square()
+ dot = Dot()
+ scene.play(MoveAlongPath(dot, square))
-class ShiftTest(Scene):
- def construct(self):
- square = Square()
- self.play(square.animate.shift(UP))
+@frames_comparison(last_frame=False)
+def test_Rotate(scene):
+ square = Square()
+ scene.play(Rotate(square, PI))
-MODULE_NAME = "movements"
+@frames_comparison(last_frame=False)
+def test_MoveTo(scene):
+ square = Square()
+ scene.play(square.animate.move_to(np.array([1.0, 1.0, 0.0])))
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison(last_frame=False)
+def test_Shift(scene):
+ square = Square()
+ scene.play(square.animate.shift(UP))
diff --git a/tests/test_graphical_units/test_opengl.py b/tests/test_graphical_units/test_opengl.py
index 4d49af5f9..73e4af106 100644
--- a/tests/test_graphical_units/test_opengl.py
+++ b/tests/test_graphical_units/test_opengl.py
@@ -2,25 +2,16 @@ import pytest
from manim import *
from manim.opengl import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
+__module_test__ = "opengl"
-class CircleTest(Scene):
- def construct(self):
- circle = OpenGLCircle().set_color(RED)
- self.add(circle)
- self.wait()
-
-
-MODULE_NAME = "opengl"
-
-
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- with tempconfig({"use_opengl_renderer": True}):
- # allow 1/255 RGB value differences with opengl tests because of differences across platforms
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir, rgb_atol=1.01).test(
- show_diff=show_diff
- )
+ reason="OpenGL is really hard to test. It will be tested when the design is largely improved. This test has an error for a reason that I can't understand/s"
+)
+@frames_comparison(use_opengl_renderer=True)
+def test_Circle(scene):
+ circle = OpenGLCircle().set_color(RED)
+ scene.add(circle)
+ scene.wait()
diff --git a/tests/test_graphical_units/test_polyhedra.py b/tests/test_graphical_units/test_polyhedra.py
index 1fd0353a8..8994df751 100644
--- a/tests/test_graphical_units/test_polyhedra.py
+++ b/tests/test_graphical_units/test_polyhedra.py
@@ -1,34 +1,24 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class TetrahedronTest(ThreeDScene):
- def construct(self):
- self.add(Tetrahedron())
-
-
-class OctahedronTest(ThreeDScene):
- def construct(self):
- self.add(Octahedron())
+__module_test__ = "polyhedra"
-class IcosahedronTest(ThreeDScene):
- def construct(self):
- self.add(Icosahedron())
+@frames_comparison
+def test_Tetrahedron(scene):
+ scene.add(Tetrahedron())
-class DodecahedronTest(ThreeDScene):
- def construct(self):
- self.add(Dodecahedron())
+@frames_comparison
+def test_Octahedron(scene):
+ scene.add(Octahedron())
-MODULE_NAME = "polyhedra"
+@frames_comparison
+def test_Icosahedron(scene):
+ scene.add(Icosahedron())
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison
+def test_Dodecahedron(scene):
+ scene.add(Dodecahedron())
diff --git a/tests/test_graphical_units/test_tabular.py b/tests/test_graphical_units/test_tabular.py
index 1eb81bc43..01b0fb426 100644
--- a/tests/test_graphical_units/test_tabular.py
+++ b/tests/test_graphical_units/test_tabular.py
@@ -1,56 +1,46 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
-
-
-class TabularTest(Scene):
- def construct(self):
- t = Tabular(
- [["1", "2"], ["3", "4"]],
- row_labels=[Tex("R1"), Tex("R2")],
- col_labels=[Tex("C1"), Tex("C2")],
- top_left_entry=MathTex("TOP"),
- element_to_mobject=Tex,
- include_outer_lines=True,
- )
- self.add(t)
-
-
-class MathTabularTest(Scene):
- def construct(self):
- t = MathTabular([[1, 2], [3, 4]])
- self.add(t)
+__module_test__ = "tabular"
-class MobjectTabularTest(Scene):
- def construct(self):
- a = Circle().scale(0.5)
- t = MobjectTabular([[a.copy(), a.copy()], [a.copy(), a.copy()]])
- self.add(t)
+@frames_comparison
+def test_tabular(scene):
+ t = Tabular(
+ [["1", "2"], ["3", "4"]],
+ row_labels=[Tex("R1"), Tex("R2")],
+ col_labels=[Tex("C1"), Tex("C2")],
+ top_left_entry=MathTex("TOP"),
+ element_to_mobject=Tex,
+ include_outer_lines=True,
+ )
+ scene.add(t)
-class IntegerTabularTest(Scene):
- def construct(self):
- t = IntegerTabular(
- np.arange(1, 21).reshape(5, 4),
- )
- self.add(t)
+@frames_comparison
+def test_MathTabular(scene):
+ t = MathTabular([[1, 2], [3, 4]])
+ scene.add(t)
-class DecimalTabularTest(Scene):
- def construct(self):
- t = DecimalTabular(
- np.linspace(0, 0.9, 20).reshape(5, 4),
- )
- self.add(t)
+@frames_comparison
+def test_MobjectTabular(scene):
+ a = Circle().scale(0.5)
+ t = MobjectTabular([[a.copy(), a.copy()], [a.copy(), a.copy()]])
+ scene.add(t)
-MODULE_NAME = "tabular"
+@frames_comparison
+def test_IntegerTabular(scene):
+ t = IntegerTabular(
+ np.arange(1, 21).reshape(5, 4),
+ )
+ scene.add(t)
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison
+def test_DecimalTabular(scene):
+ t = DecimalTabular(
+ np.linspace(0, 0.9, 20).reshape(5, 4),
+ )
+ scene.add(t)
diff --git a/tests/test_graphical_units/test_threed.py b/tests/test_graphical_units/test_threed.py
index ff310bbc8..5f522dc49 100644
--- a/tests/test_graphical_units/test_threed.py
+++ b/tests/test_graphical_units/test_threed.py
@@ -1,134 +1,126 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
+__module_test__ = "threed"
-class CubeTest(ThreeDScene):
- def construct(self):
- self.add(Cube())
+@frames_comparison(base_scene=ThreeDScene)
+def test_Cube(scene):
+ scene.add(Cube())
-class SphereTest(ThreeDScene):
- def construct(self):
- self.add(Sphere())
+@frames_comparison(base_scene=ThreeDScene)
+def test_Sphere(scene):
+ scene.add(Sphere())
-class Dot3DTest(ThreeDScene):
- def construct(self):
- self.add(Dot3D())
+@frames_comparison(base_scene=ThreeDScene)
+def test_Dot3D(scene):
+ scene.add(Dot3D())
-class ConeTest(ThreeDScene):
- def construct(self):
- self.add(Cone())
+@frames_comparison(base_scene=ThreeDScene)
+def test_Cone(scene):
+ scene.add(Cone())
-class CylinderTest(ThreeDScene):
- def construct(self):
- self.add(Cylinder())
+@frames_comparison(base_scene=ThreeDScene)
+def test_Cylinder(scene):
+ scene.add(Cylinder())
-class Line3DTest(ThreeDScene):
- def construct(self):
- self.add(Line3D())
+@frames_comparison(base_scene=ThreeDScene)
+def test_Line3D(scene):
+ scene.add(Line3D())
-class Arrow3DTest(ThreeDScene):
- def construct(self):
- self.add(Arrow3D())
+@frames_comparison(base_scene=ThreeDScene)
+def test_Arrow3D(scene):
+ scene.add(Arrow3D())
-class TorusTest(ThreeDScene):
- def construct(self):
- self.add(Torus())
+@frames_comparison(base_scene=ThreeDScene)
+def test_Torus(scene):
+ scene.add(Torus())
-class AxesTest(ThreeDScene):
- def construct(self):
- self.add(ThreeDAxes(axis_config={"exclude_origin_tick": False}))
+@frames_comparison(base_scene=ThreeDScene)
+def test_Axes(scene):
+ scene.add(ThreeDAxes(axis_config={"exclude_origin_tick": False}))
-class CameraMoveTest(ThreeDScene):
+@frames_comparison(base_scene=ThreeDScene)
+def test_CameraMoveAxes(scene):
"""Tests camera movement to explore varied views of a static scene."""
+ axes = ThreeDAxes()
+ scene.add(axes)
+ scene.add(Dot([1, 2, 3]))
+ scene.move_camera(phi=PI / 8, theta=-PI / 8, frame_center=[1, 2, 3])
+
- def construct(self):
- axes = ThreeDAxes()
- self.add(axes)
- self.add(Dot([1, 2, 3]))
- self.move_camera(phi=PI / 8, theta=-PI / 8, frame_center=[1, 2, 3])
+@frames_comparison(base_scene=ThreeDScene)
+def test_CameraMove(scene):
+ cube = Cube()
+ scene.add(cube)
+ scene.move_camera(phi=PI / 4, theta=PI / 4, frame_center=[0, 0, -1])
-class AmbientCameraMoveTest(ThreeDScene):
- def construct(self):
- cube = Cube()
- self.begin_ambient_camera_rotation(rate=0.5)
- self.add(cube)
- self.wait()
+@frames_comparison(base_scene=ThreeDScene)
+def test_AmbientCameraMove(scene):
+ cube = Cube()
+ scene.begin_ambient_camera_rotation(rate=0.5)
+ scene.add(cube)
+ scene.wait()
# TODO: bring test back after introducing testing tolerance
# to account for OS-specific differences in numerics.
# class FixedInFrameMObjectTest(ThreeDScene):
-# def construct(self):
+# def construct(scene):
# axes = ThreeDAxes()
-# self.set_camera_orientation(phi=75 * DEGREES, theta=-45 * DEGREES)
+# scene.set_camera_orientation(phi=75 * DEGREES, theta=-45 * DEGREES)
# circ = Circle()
-# self.add_fixed_in_frame_mobjects(circ)
+# scene.add_fixed_in_frame_mobjects(circ)
# circ.to_corner(UL)
-# self.add(axes)
-
-
-class MovingVerticesTest(ThreeDScene):
- def construct(self):
- self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
- vertices = [1, 2, 3, 4]
- edges = [(1, 2), (2, 3), (3, 4), (1, 3), (1, 4)]
- g = Graph(vertices, edges)
- self.add(g)
- self.play(
- g[1].animate.move_to([1, 1, 1]),
- g[2].animate.move_to([-1, 1, 2]),
- g[3].animate.move_to([1, -1, -1]),
- g[4].animate.move_to([-1, -1, 0]),
- )
- self.wait()
-
-
-class SurfaceColorscaleTest(ThreeDScene):
- def construct(self):
- resolution_fa = 50
- self.set_camera_orientation(phi=75 * DEGREES, theta=-30 * DEGREES)
-
- axes = ThreeDAxes(x_range=(-3, 3, 1), y_range=(-3, 3, 1), z_range=(-4, 4, 1))
-
- def param_trig(u, v):
- x = u
- y = v
- z = y ** 2 / 2 - x ** 2 / 2
- return z
-
- trig_plane = ParametricSurface(
- lambda x, y: axes.c2p(x, y, param_trig(x, y)),
- resolution=(resolution_fa, resolution_fa),
- v_min=-3,
- v_max=+3,
- u_min=-3,
- u_max=+3,
- )
-
- trig_plane.set_fill_by_value(
- axes=axes, colors=[BLUE, GREEN, YELLOW, ORANGE, RED]
- )
- self.add(axes, trig_plane)
-
-
-MODULE_NAME = "threed"
-
-
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+# scene.add(axes)
+
+
+@frames_comparison(base_scene=ThreeDScene)
+def test_MovingVertices(scene):
+ scene.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
+ vertices = [1, 2, 3, 4]
+ edges = [(1, 2), (2, 3), (3, 4), (1, 3), (1, 4)]
+ g = Graph(vertices, edges)
+ scene.add(g)
+ scene.play(
+ g[1].animate.move_to([1, 1, 1]),
+ g[2].animate.move_to([-1, 1, 2]),
+ g[3].animate.move_to([1, -1, -1]),
+ g[4].animate.move_to([-1, -1, 0]),
+ )
+ scene.wait()
+
+
+@frames_comparison(base_scene=ThreeDScene)
+def test_SurfaceColorscale(scene):
+ resolution_fa = 50
+ scene.set_camera_orientation(phi=75 * DEGREES, theta=-30 * DEGREES)
+ axes = ThreeDAxes(x_range=(-3, 3, 1), y_range=(-3, 3, 1), z_range=(-4, 4, 1))
+
+ def param_trig(u, v):
+ x = u
+ y = v
+ z = y ** 2 / 2 - x ** 2 / 2
+ return z
+
+ trig_plane = ParametricSurface(
+ lambda x, y: axes.c2p(x, y, param_trig(x, y)),
+ resolution=(resolution_fa, resolution_fa),
+ v_min=-3,
+ v_max=+3,
+ u_min=-3,
+ u_max=+3,
+ )
+ trig_plane.set_fill_by_value(axes=axes, colors=[BLUE, GREEN, YELLOW, ORANGE, RED])
+ scene.add(axes, trig_plane)
diff --git a/tests/test_graphical_units/test_transform.py b/tests/test_graphical_units/test_transform.py
index 5e4a8fdf8..8056578f0 100644
--- a/tests/test_graphical_units/test_transform.py
+++ b/tests/test_graphical_units/test_transform.py
@@ -1,152 +1,142 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import get_scenes_to_test
+__module_test__ = "transform"
-class TransformTest(Scene):
- def construct(self):
- square = Square()
- circle = Circle()
- self.play(Transform(square, circle))
+@frames_comparison(last_frame=False)
+def test_Transform(scene):
+ square = Square()
+ circle = Circle()
+ scene.play(Transform(square, circle))
-class TransformFromCopyTest(Scene):
- def construct(self):
- square = Square()
- circle = Circle()
- self.play(TransformFromCopy(square, circle))
+@frames_comparison(last_frame=False)
+def test_TransformFromCopy(scene):
+ square = Square()
+ circle = Circle()
+ scene.play(TransformFromCopy(square, circle))
-class ClockwiseTransformTest(Scene):
- def construct(self):
- square = Square()
- circle = Circle()
- self.play(ClockwiseTransform(square, circle))
+@frames_comparison(last_frame=False)
+def test_ClockwiseTransform(scene):
+ square = Square()
+ circle = Circle()
+ scene.play(ClockwiseTransform(square, circle))
-class CounterclockwiseTransformTest(Scene):
- def construct(self):
- square = Square()
- circle = Circle()
- self.play(CounterclockwiseTransform(square, circle))
+@frames_comparison(last_frame=False)
+def test_CounterclockwiseTransform(scene):
+ square = Square()
+ circle = Circle()
+ scene.play(CounterclockwiseTransform(square, circle))
-class MoveToTargetTest(Scene):
- def construct(self):
- square = Square()
- square.generate_target()
- square.target.shift(3 * UP)
- self.play(MoveToTarget(square))
+@frames_comparison(last_frame=False)
+def test_MoveToTarget(scene):
+ square = Square()
+ square.generate_target()
+ square.target.shift(3 * UP)
+ scene.play(MoveToTarget(square))
-class ApplyPointwiseFunctionTest(Scene):
- def construct(self):
- square = Square()
+@frames_comparison(last_frame=False)
+def test_ApplyPointwiseFunction(scene):
+ square = Square()
- def func(p):
- return np.array([1.0, 1.0, 0.0])
+ def func(p):
+ return np.array([1.0, 1.0, 0.0])
- self.play(ApplyPointwiseFunction(func, square))
+ scene.play(ApplyPointwiseFunction(func, square))
-class FadeToColortTest(Scene):
- def construct(self):
- square = Square()
- self.play(FadeToColor(square, RED))
+@frames_comparison(last_frame=False)
+def test_FadeToColort(scene):
+ square = Square()
+ scene.play(FadeToColor(square, RED))
-class ScaleInPlaceTest(Scene):
- def construct(self):
- square = Square()
- self.play(ScaleInPlace(square, scale_factor=0.1))
+@frames_comparison(last_frame=False)
+def test_ScaleInPlace(scene):
+ square = Square()
+ scene.play(ScaleInPlace(square, scale_factor=0.1))
-class ShrinkToCenterTest(Scene):
- def construct(self):
- square = Square()
- self.play(ShrinkToCenter(square))
+@frames_comparison(last_frame=False)
+def test_ShrinkToCenter(scene):
+ square = Square()
+ scene.play(ShrinkToCenter(square))
-class RestoreTest(Scene):
- def construct(self):
- square = Square()
- circle = Circle()
- self.play(Transform(square, circle))
- square.save_state()
- self.play(square.animate.shift(UP))
- self.play(Restore(square))
+@frames_comparison(last_frame=False)
+def test_Restore(scene):
+ square = Square()
+ circle = Circle()
+ scene.play(Transform(square, circle))
+ square.save_state()
+ scene.play(square.animate.shift(UP))
+ scene.play(Restore(square))
-class ApplyFunctionTest(Scene):
- def construct(self):
- square = Square()
- self.add(square)
+@frames_comparison
+def test_ApplyFunction(scene):
+ square = Square()
+ scene.add(square)
- def apply_function(mob):
- mob.scale(2)
- mob.to_corner(UR)
- mob.rotate(PI / 4)
- mob.set_color(RED)
- return mob
+ 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))
+ scene.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
- )
+@frames_comparison(last_frame=False)
+def test_ApplyComplexFunction(scene):
+ square = Square()
+ scene.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))
-
-
-class FadeInAndOutTest(Scene):
- def construct(self):
- square = Square(color=BLUE).shift(2 * UP)
- annotation = Square(color=BLUE)
- self.add(annotation)
- self.play(FadeIn(square))
+@frames_comparison(last_frame=False)
+def test_ApplyMatrix(scene):
+ square = Square()
+ matrice = [[1.0, 0.5], [1.0, 0.0]]
+ scene.play(ApplyMatrix(matrice, square))
- annotation.become(Square(color=RED).rotate(PI / 4))
- self.add(annotation)
- self.play(FadeOut(square))
+@frames_comparison(last_frame=False)
+def test_CyclicReplace(scene):
+ square = Square()
+ circle = Circle()
+ circle.shift(3 * UP)
+ scene.play(CyclicReplace(square, circle))
-class MatchPointsScene(Scene):
- def construct(self):
- circ = Circle(fill_color=RED, fill_opacity=0.8)
- square = Square(fill_color=BLUE, fill_opacity=0.2)
- self.play(circ.animate.match_points(square))
+@frames_comparison(last_frame=False)
+def test_FadeInAndOut(scene):
+ square = Square(color=BLUE).shift(2 * UP)
+ annotation = Square(color=BLUE)
+ scene.add(annotation)
+ scene.play(FadeIn(square))
-class AnimationBuilderTest(Scene):
- def construct(self):
- self.play(Square().animate.shift(RIGHT).rotate(PI / 4))
+ annotation.become(Square(color=RED).rotate(PI / 4))
+ scene.add(annotation)
+ scene.play(FadeOut(square))
-MODULE_NAME = "transform"
+@frames_comparison
+def test_MatchPointsScene(scene):
+ circ = Circle(fill_color=RED, fill_opacity=0.8)
+ square = Square(fill_color=BLUE, fill_opacity=0.2)
+ scene.play(circ.animate.match_points(square))
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison(last_frame=False)
+def test_AnimationBuilder(scene):
+ scene.play(Square().animate.shift(RIGHT).rotate(PI / 4))
diff --git a/tests/test_graphical_units/test_updaters.py b/tests/test_graphical_units/test_updaters.py
index 336c0cb3f..9340c9ded 100644
--- a/tests/test_graphical_units/test_updaters.py
+++ b/tests/test_graphical_units/test_updaters.py
@@ -1,53 +1,43 @@
-import pytest
-
from manim import *
+from tests.test_graphical_units.testing.frames_comparison import frames_comparison
-from ..utils.GraphicalUnitTester import GraphicalUnitTester
-from ..utils.testing_utils import 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.animate.shift(UP * 2))
- square.clear_updaters()
-
-
-class ValueTrackerTest(Scene):
- def construct(self):
- theta = ValueTracker(PI / 2)
- line = Line(ORIGIN, RIGHT)
- line.rotate(theta.get_value(), about_point=ORIGIN)
- self.add(line)
+__module_test__ = "updaters"
-class UpdateSceneDuringAnimationTest(Scene):
- def construct(self):
- def f(mob):
- self.add(Square())
+@frames_comparison(last_frame=False)
+def test_Updater(scene):
+ dot = Dot()
+ square = Square()
+ scene.add(dot, square)
+ square.add_updater(lambda m: m.next_to(dot, RIGHT, buff=SMALL_BUFF))
+ scene.add(square)
+ scene.play(dot.animate.shift(UP * 2))
+ square.clear_updaters()
- s = Circle().add_updater(f)
- self.play(Create(s))
+@frames_comparison
+def test_ValueTracker(scene):
+ theta = ValueTracker(PI / 2)
+ line = Line(ORIGIN, RIGHT)
+ line.rotate(theta.get_value(), about_point=ORIGIN)
+ scene.add(line)
-class LastFrameWhenClearedTest(Scene):
- def construct(self):
- dot = Dot()
- square = Square()
- square.add_updater(lambda m: m.move_to(dot, UL))
- self.add(square)
- self.play(dot.animate.shift(UP * 2), rate_func=linear)
- square.clear_updaters()
- self.wait()
+@frames_comparison(last_frame=False)
+def test_UpdateSceneDuringAnimation(scene):
+ def f(mob):
+ scene.add(Square())
-MODULE_NAME = "updaters"
+ s = Circle().add_updater(f)
+ scene.play(Create(s))
[email protected]("scene_to_test", get_scenes_to_test(__name__), indirect=False)
-def test_scene(scene_to_test, tmpdir, show_diff):
- GraphicalUnitTester(scene_to_test[1], MODULE_NAME, tmpdir).test(show_diff=show_diff)
+@frames_comparison(last_frame=False)
+def test_LastFrameWhenCleared(scene):
+ dot = Dot()
+ square = Square()
+ square.add_updater(lambda m: m.move_to(dot, UL))
+ scene.add(square)
+ scene.play(dot.animate.shift(UP * 2), rate_func=linear)
+ square.clear_updaters()
+ scene.wait()
diff --git a/tests/test_graphical_units/testing/_frames_testers.py b/tests/test_graphical_units/testing/_frames_testers.py
index 432f8e92b..29601e096 100644
--- a/tests/test_graphical_units/testing/_frames_testers.py
+++ b/tests/test_graphical_units/testing/_frames_testers.py
@@ -1,5 +1,6 @@
import contextlib
from pathlib import Path
+from typing import Tuple
import numpy as np
@@ -23,6 +24,7 @@ class _FramesTester:
# For backward compatibility, when the control data contains only one frame (<= v0.8.0)
if len(self._frames.shape) != 4:
self._frames = np.expand_dims(self._frames, axis=0)
+ print(self._frames.shape)
self._number_frames = np.ma.size(self._frames, axis=0)
yield
assert self._frames_compared == self._number_frames, (
@@ -36,9 +38,10 @@ class _FramesTester:
f"when there are {self._number_frames} control frames."
)
try:
- np.testing.assert_array_equal(
- self._frames[frame_number],
+ np.testing.assert_allclose(
frame,
+ self._frames[frame_number],
+ atol=1.01,
err_msg=f"Frame no {frame_number}. You can use --show_diff to visually show the difference.",
verbose=False,
)
@@ -50,9 +53,9 @@ class _FramesTester:
class _ControlDataWriter(_FramesTester):
- def __init__(self, file_path: Path) -> None:
+ def __init__(self, file_path: Path, size_frame: Tuple) -> None:
self.file_path = file_path
- self.frames = np.empty((0, 480, 854, 4))
+ self.frames = np.empty((0, *size_frame, 4))
self._number_frames_written: int = 0
# Actually write a frame.
@@ -67,6 +70,7 @@ class _ControlDataWriter(_FramesTester):
self.save_contol_data()
def save_contol_data(self):
+ self.frames = self.frames.astype("uint8")
np.savez_compressed(self.file_path, frame_data=self.frames)
logger.info(
f"{self._number_frames_written} control frames saved in {self.file_path}"
diff --git a/tests/test_graphical_units/testing/_test_class_makers.py b/tests/test_graphical_units/testing/_test_class_makers.py
index 5b5b8bfd1..39947332c 100644
--- a/tests/test_graphical_units/testing/_test_class_makers.py
+++ b/tests/test_graphical_units/testing/_test_class_makers.py
@@ -1,6 +1,5 @@
from typing import Callable, Type
-from manim.renderer.cairo_renderer import CairoRenderer
from manim.scene.scene import Scene
from manim.scene.scene_file_writer import SceneFileWriter
@@ -20,8 +19,9 @@ def _make_test_scene_class(
construct_test(self)
# Manim hack to render the very last frame (normally the last frame is not the very end of the animation)
- self.update_to_time(self.get_run_time(self.animations))
- self.renderer.render(self, 1, self.moving_mobjects)
+ if self.animations is not None:
+ self.update_to_time(self.get_run_time(self.animations))
+ self.renderer.render(self, 1, self.moving_mobjects)
return _TestedScene
diff --git a/tests/test_graphical_units/testing/config_graphical_tests_multiframes.cfg b/tests/test_graphical_units/testing/config_graphical_tests_multiframes.cfg
index d2d90c5be..26768f5cc 100644
--- a/tests/test_graphical_units/testing/config_graphical_tests_multiframes.cfg
+++ b/tests/test_graphical_units/testing/config_graphical_tests_multiframes.cfg
@@ -2,6 +2,6 @@
[CLI]
frame_rate = 6
-pixel_height = 480
-pixel_width = 854
+pixel_height = 240
+pixel_width = 427
disable_caching = True
diff --git a/tests/test_graphical_units/testing/frames_comparison.py b/tests/test_graphical_units/testing/frames_comparison.py
index 37e3b9788..8bac401c3 100644
--- a/tests/test_graphical_units/testing/frames_comparison.py
+++ b/tests/test_graphical_units/testing/frames_comparison.py
@@ -1,16 +1,16 @@
import functools
import inspect
-import itertools
from pathlib import Path
-from typing import Any, Callable, Type
+from typing import Callable, Tuple, Type
from _pytest.fixtures import FixtureRequest
-from _pytest.mark.structures import Mark
-from manim import Scene, config
+from manim import Scene
from manim._config import tempconfig
from manim._config.utils import ManimConfig
+from manim.camera.three_d_camera import ThreeDCamera
from manim.renderer.cairo_renderer import CairoRenderer
+from manim.scene.three_d_scene import ThreeDScene
from ._frames_testers import _ControlDataWriter, _FramesTester
from ._test_class_makers import (
@@ -26,20 +26,21 @@ PATH_CONTROL_DATA = _tests_root_dir_path / Path("control_data", "graphical_units
def frames_comparison(
- test_name: str,
- module_name: str,
+ func=None,
+ *,
last_frame: bool = True,
renderer_class=CairoRenderer,
base_scene=Scene,
**custom_config,
):
- """Compares the frames generated by the test with control frames
- specified with the ``test_name`` and ``module_name``.
+ """Compares the frames generated by the test with control frames previously registered.
If there is no control frames for this test, the test will fail. To generate
control frames for a given test, pass ``--set_test`` flag to pytest
while running the test.
+ Note that this decorator can be use with or without parentheses.
+
Parameters
----------
test_name
@@ -58,7 +59,7 @@ def frames_comparison(
If the scene has a moving animation, then the test must set last_frame to False.
"""
- def decorator(tested_scene_construct):
+ def decorator_maker(tested_scene_construct):
if (
SCENE_PARAMETER_NAME
not in inspect.getfullargspec(tested_scene_construct).args
@@ -72,6 +73,13 @@ def frames_comparison(
functools.partial(tested_scene_construct, scene=None)
)
+ if "__module_test__" not in tested_scene_construct.__globals__:
+ raise Exception(
+ "There is no module test name indicated for the graphical unit test. You have to declare __module_test__ in the test file."
+ )
+ module_name = tested_scene_construct.__globals__.get("__module_test__")
+ test_name = tested_scene_construct.__name__[len("test_") :]
+
@functools.wraps(tested_scene_construct)
# The "request" parameter is meant to be used as a fixture by pytest. See below.
def wrapper(*args, request: FixtureRequest, tmp_path, **kwargs):
@@ -85,6 +93,15 @@ def frames_comparison(
map(lambda tup: f"{str(tup[0])}:{str(tup[1])}", kwargs.items())
)
+ config_tests = _config_test(last_frame)
+
+ config_tests["text_dir"] = tmp_path
+ config_tests["tex_dir"] = tmp_path
+
+ if last_frame:
+ config_tests["frame_rate"] = 1
+ config_tests["dry_run"] = True
+
setting_test = request.config.getoption("--set_test")
real_test = _make_test_comparing_frames(
file_path=_control_data_path(
@@ -96,17 +113,9 @@ def frames_comparison(
is_set_test_data_test=setting_test,
last_frame=last_frame,
show_diff=request.config.getoption("--show_diff"),
+ size_frame=(config_tests["pixel_height"], config_tests["pixel_width"]),
)
- config_tests = _config_test(last_frame)
-
- config_tests["text_dir"] = tmp_path
- config_tests["tex_dir"] = tmp_path
-
- if last_frame:
- config["frame_rate"] = 1
- config["dry_run"] = True
-
# Isolate the config used for the test, to avoid a modifying the global config during the test run.
with tempconfig({**custom_config, **config_tests}):
real_test()
@@ -130,7 +139,11 @@ def frames_comparison(
wrapper.pytestmark = new_marks
return wrapper
- return decorator
+ # Case where the decorator is called with and without parentheses.
+ # If func is None, callabl(None) returns False
+ if callable(func):
+ return decorator_maker(func)
+ return decorator_maker
def _make_test_comparing_frames(
@@ -141,6 +154,7 @@ def _make_test_comparing_frames(
is_set_test_data_test: bool,
last_frame: bool,
show_diff: bool,
+ size_frame: Tuple,
) -> Callable[[], None]:
"""Create the real pytest test that will fail if the frames mismatch.
@@ -164,7 +178,7 @@ def _make_test_comparing_frames(
"""
if is_set_test_data_test:
- frames_tester = _ControlDataWriter(file_path)
+ frames_tester = _ControlDataWriter(file_path, size_frame=size_frame)
else:
frames_tester = _FramesTester(file_path, show_diff=show_diff)
@@ -180,7 +194,15 @@ def _make_test_comparing_frames(
sceneTested = _make_test_scene_class(
base_scene=base_scene,
construct_test=construct,
- test_renderer=testRenderer(file_writer_class=file_writer_class),
+ # NOTE this is really ugly but it's due to the very bad design of the two renderers.
+ # If you pass a custom renderer to the Scene, the Camera class given as an argument in the Scene
+ # is not passed to the renderer. See __init__ of Scene.
+ # This potentially prevents OpenGL testing.
+ test_renderer=testRenderer(file_writer_class=file_writer_class)
+ if base_scene is not ThreeDScene
+ else testRenderer(
+ file_writer_class=file_writer_class, camera_class=ThreeDCamera
+ ), # testRenderer(file_writer_class=file_writer_class),
)
scene_tested = sceneTested(skip_animations=True)
scene_tested.render()