Skip to content

Instantly share code, notes, and snippets.

@naveen521kk
Created April 2, 2021 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naveen521kk/12ad63e6004cff96f112338c61260d8e to your computer and use it in GitHub Desktop.
Save naveen521kk/12ad63e6004cff96f112338c61260d8e to your computer and use it in GitHub Desktop.
A small smoke tests to test the chocolatey package
from manim import *
class SmokeTests(Scene):
def wait_and_clean(self):
self.wait(1)
self.clear()
def construct(self):
tex_test = [
r"\LaTeX",
r"$\xrightarrow{x^2y^3}$ \LaTeX",
r'$\mathtt{H} \looparrowright$ \LaTeX'
]
for tex in tex_test:
self.add(Tex(tex))
self.wait_and_clean()
math_tex_test = [
"\\frac{d}{dx}f(x)g(x)=",
"f(x)\\frac{d}{dx}g(x)",
"+",
"g(x)\\frac{d}{dx}f(x)",
]
for m_tex in math_tex_test:
self.add(MathTex(m_tex))
self.wait_and_clean()
text=MathTex(
"\\frac{d}{dx}f(x)g(x)=", #0
"f(x)\\frac{d}{dx}g(x)", #1
"+", #2
"g(x)\\frac{d}{dx}f(x)" #3
)
self.play(Write(text))
brace1 = Brace(text[1], UP, buff=SMALL_BUFF)
self.add(brace1)
self.wait_and_clean()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment