A community-maintained Python framework for creating mathematical animations.
removed damn blank lines
Hugues Devimeux21438aec245c
diff --git a/tests/test_creation.py b/tests/test_creation.pyindex c9d97cad1..edf682086 100644--- a/tests/test_creation.py+++ b/tests/test_creation.py@@ -5,14 +5,12 @@ from testing_utils import utils_test_scenes, get_scenes_to_testclass ShowCreationTest(Scene):def construct(self):square = Square()-self.play(ShowCreation(square))class UncreateTest(Scene):def construct(self):square = Square()-self.add(square)self.play(Uncreate(square))@@ -20,7 +18,6 @@ class UncreateTest(Scene):class DrawBorderThenFillTest(Scene):def construct(self):square = Square(fill_opacity=1)-self.play(DrawBorderThenFill(square))@@ -30,77 +27,66 @@ class FadeOutTest(Scene):def construct(self):square = Square()self.add(square)-self.play(FadeOut(square))class FadeInTest(Scene):def construct(self):square = Square()-self.play(FadeIn(square))class FadeInFromTest(Scene):def construct(self):square = Square()-self.play(FadeInFrom(square, direction=UP))class FadeInFromDownTest(Scene):def construct(self):square = Square()-self.play(FadeInFromDown(square))class FadeOutAndShiftTest(Scene):def construct(self):square = Square()-self.play(FadeOutAndShift(square, direction=UP))class FadeInFromLargeTest(Scene):def construct(self):square = Square()-self.play(FadeInFromLarge(square))class GrowFromPointTest(Scene):def construct(self):square = Square()-self.play(GrowFromPoint(square, np.array((1, 1, 0))))class GrowFromCenterTest(Scene):def construct(self):square = Square()-self.play(GrowFromCenter(square))class GrowFromEdgeTest(Scene):def construct(self):square = Square()-self.play(GrowFromEdge(square, DOWN))class SpinInFromNothingTest(Scene):def construct(self):square = Square()-self.play(SpinInFromNothing(square))class ShrinkToCenterTest(Scene):def construct(self):square = Square()-self.play(ShrinkToCenter(square))def test_scenes(get_config_test):diff --git a/tests/test_geometry.py b/tests/test_geometry.pyindex e6116fbef..6fa61304d 100644--- a/tests/test_geometry.py+++ b/tests/test_geometry.py@@ -8,7 +8,6 @@ class CoordinatesTest(Scene):for x in range(-7, 8):for y in range(-4, 5):dots.append(Dot(np.array([x, y, 0])))-self.play(Animation(VGroup(*dots)))@@ -33,70 +32,60 @@ class CurvedArrowTest(Scene):class CircleTest(Scene):def construct(self):circle = Circle()-self.play(Animation(circle))class DotTest(Scene):def construct(self):dot = Dot()-self.play(Animation(dot))class EllipseTest(Scene):def construct(self):e = Ellipse()-self.play(Animation(e))class SectorTest(Scene):def construct(self):e = Sector()-self.play(Animation(e))class AnnulusTest(Scene):def construct(self):a = Annulus()-self.play(Animation(a))class AnnularSectorTest(Scene):def construct(self):a = AnnularSector()-self.play(Animation(a))class LineTest(Scene):def construct(self):a = Line(np.array([1, 1, 0]), np.array([2, 2, 0]))-self.play(Animation(a))class Elbowtest(Scene):def construct(self):a = Elbow()-self.play(Animation(a))class DoubleArrowTest(Scene):def construct(self):a = DoubleArrow()-self.play(Animation(a))class VectorTest(Scene):def construct(self):a = Vector(UP)-self.play(Animation(a))@@ -104,20 +93,17 @@ class PolygonTest(Scene):def construct(self):a = Polygon(*[np.array([1, 1, 0]), np.array([2, 2, 0]), np.array([2, 3, 0])])-self.play(Animation(a))class RectangleTest(Scene):def construct(self):a = Rectangle()-self.play(Animation(a))class RoundedRectangleTest(Scene):def construct(self):a = RoundedRectangle()-self.play(Animation(a))def test_scenes(get_config_test):diff --git a/tests/test_graph.py b/tests/test_graph.pyindex 72f317d29..d91978504 100644--- a/tests/test_graph.py+++ b/tests/test_graph.py@@ -16,10 +16,8 @@ class PlotFunctions(GraphScene):def construct(self):constants.TEX_TEMPLATE = TexTemplate()-self.setup_axes()f = self.get_graph(lambda x : x**2)-self.play(Animation(f))def test_scenes(get_config_test):diff --git a/tests/test_indication.py b/tests/test_indication.pyindex f4161ff83..10207771b 100644--- a/tests/test_indication.py+++ b/tests/test_indication.py@@ -6,14 +6,12 @@ class FocusOnTest(Scene):def construct(self):square = Square()self.add(square)-self.play(FocusOn(square))class IndicateTest(Scene):def construct(self):square = Square()-self.play(Indicate(square))@@ -21,7 +19,6 @@ class FlashTest(Scene):def construct(self):square = Square()self.add(square)-self.play(Flash(square))@@ -29,7 +26,6 @@ class CircleIndicateTest(Scene):def construct(self):square = Square()self.add(square)-self.play(CircleIndicate(square))@@ -37,35 +33,30 @@ class ShowPassingFlashTest(Scene):def construct(self):square = Square()self.add(square)-self.play(ShowPassingFlash(square))class ShowCreationThenDestructionTest(Scene):def construct(self):square = Square()-self.play(ShowCreationThenDestruction(square))class ShowCreationThenFadeOutTest(Scene):def construct(self):square = Square()-self.play(ShowCreationThenFadeOut(square))class ShowPassingFlashAroundTest(Scene):def construct(self):circle = Circle()-self.play(ShowPassingFlashAround(circle))class ApplyWaveTest(Scene):def construct(self):square = Square()-self.play(ApplyWave(square))@@ -73,7 +64,6 @@ class WiggleOutThenInTest(Scene):def construct(self):square = Square()self.add(square)-self.play(WiggleOutThenIn(square))@@ -81,7 +71,6 @@ class TurnInsideOutTest(Scene):def construct(self):square = Square()self.add(square)-self.play(TurnInsideOut(square))def test_scenes(get_config_test):diff --git a/tests/test_movements.py b/tests/test_movements.pyindex c1c6e148e..ed2774b95 100644--- a/tests/test_movements.py+++ b/tests/test_movements.py@@ -9,19 +9,15 @@ class HomotopyTest(Scene):tau = interpolate(5, -5, t) + norm/FRAME_X_RADIUSalpha = sigmoid(tau)return [x, y + 0.5*np.sin(2*np.pi*alpha)-t*SMALL_BUFF/2, z]-square = Square()-self.play(Homotopy(func, square))class PhaseFlowTest(Scene):def construct(self):square = Square()-def func(t):return t*0.5*UP-self.play(PhaseFlow(func, square))@@ -29,21 +25,18 @@ class MoveAlongPathTest(Scene):def construct(self):square = Square()dot = Dot()-self.play(MoveAlongPath(dot, square))class RotateTest(Scene):def construct(self):square = Square()-self.play(Rotate(square, PI))class MoveToTest(Scene):def construct(self):square = Square()-self.play(square.move_to, np.array([1.0, 1.0, 0.0]))diff --git a/tests/test_transform.py b/tests/test_transform.pyindex 9d4cebcaf..c19df2f14 100644--- a/tests/test_transform.py+++ b/tests/test_transform.py@@ -6,7 +6,6 @@ class TransformTest(Scene):def construct(self):square = Square()circle = Circle()-self.play(Transform(square, circle))@@ -14,7 +13,6 @@ class TransformFromCopyTest(Scene):def construct(self):square = Square()circle = Circle()-self.play(TransformFromCopy(square, circle))@@ -22,7 +20,6 @@ class ClockwiseTransformTest(Scene):def construct(self):square = Square()circle = Circle()-self.play(ClockwiseTransform(square, circle))@@ -30,7 +27,6 @@ class CounterclockwiseTransformTest(Scene):def construct(self):square = Square()circle = Circle()-self.play(CounterclockwiseTransform(square, circle))@@ -39,17 +35,14 @@ class MoveToTargetTest(Scene):square = Square()square.generate_target()square.target.shift(3*UP)-self.play(MoveToTarget(square))class ApplyPointwiseFunctionTest(Scene):def construct(self):square = Square()-def func(p):return np.array([1.0, 1.0, 0.0])-self.play(ApplyPointwiseFunction(func, square))@@ -58,21 +51,18 @@ class ApplyPointwiseFunctionTest(Scene):class FadeToColortTest(Scene):def construct(self):square = Square()-self.play(FadeToColor(square, RED))class ScaleInPlaceTest(Scene):def construct(self):square = Square()-self.play(ScaleInPlace(square, scale_factor=0.1))class ShrinkToCenterTest(Scene):def construct(self):square = Square()-self.play(ShrinkToCenter(square))@@ -80,7 +70,6 @@ class RestoreTest(Scene):def construct(self):square = Square()circle = Circle()-self.play(Transform(square, circle))square.save_state()self.play(square.shift, UP)@@ -91,7 +80,6 @@ class ApplyFunctionTest(Scene):def construct(self):square = Square()self.add(square)-def apply_function(mob):mob.scale(2)mob.to_corner(UR)diff --git a/tests/test_updaters.py b/tests/test_updaters.pyindex ce6f4df65..bd8d2badc 100644--- a/tests/test_updaters.py+++ b/tests/test_updaters.py@@ -9,7 +9,6 @@ class UpdaterTest(Scene):self.add(dot, square)square.add_updater(lambda m: m.next_to(dot, RIGHT, buff=SMALL_BUFF))self.add(square)-self.play(dot.shift, UP*2)square.clear_updaters()@@ -19,7 +18,6 @@ class ValueTrackerTest(Scene):theta = ValueTracker(PI/2)line_1 = Line(ORIGIN, RIGHT*3, color=RED)line_2 = Line(ORIGIN, RIGHT*3, color=GREEN)-line_2.rotate(theta.get_value(), about_point=ORIGIN)diff --git a/tests/test_writing.py b/tests/test_writing.pyindex 694f28245..a87e2df00 100644--- a/tests/test_writing.py+++ b/tests/test_writing.py@@ -8,16 +8,13 @@ from testing_utils import utils_test_scenes, get_scenes_to_testclass TextTest(Scene):def construct(self):t = Text('testing', font = "Arial")-self.play(Animation(t))class TextMobjectTest(Scene):def construct(self):constants.TEX_TEMPLATE = TexTemplate()-t = TextMobject('Hello world !')-self.play(Animation(t))@@ -27,7 +24,6 @@ class TexMobjectTest(Scene):# i.e It will pass even if latex is not installed.# This is due to the fact that the latex used here has been cached (see test_cache directory)constants.TEX_TEMPLATE = TexTemplate()-t = TexMobject("\\sum_{n=1}^\\infty ""\\frac{1}{n^2} = \\frac{\\pi^2}{6}"