Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Update config variables and paths in tests

Devin Nealb69f6e809bd2
diff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.py
index 359271790..74751d92e 100644
--- a/manim/mobject/svg/text_mobject.py
+++ b/manim/mobject/svg/text_mobject.py
@@ -96,7 +96,7 @@ class Text(SVGMobject):
def get_space_width(self):
size = self.size * 10
- dir_name = config['TEXT_DIR']
+ dir_name = config['text_dir']
file_name = os.path.join(dir_name, "space") + '.svg'
surface = cairo.SVGSurface(file_name, 600, 400)
@@ -292,7 +292,7 @@ class Text(SVGMobject):
if NOT_SETTING_FONT_MSG != '':
logger.warning(NOT_SETTING_FONT_MSG)
- dir_name = config['TEXT_DIR']
+ dir_name = config['text_dir']
hash_name = self.text2hash()
file_name = os.path.join(dir_name, hash_name)+'.svg'
if os.path.exists(file_name):
diff --git a/tests/test_cli/test_cli.py b/tests/test_cli/test_cli.py
index 1bd6cb271..da850a147 100644
--- a/tests/test_cli/test_cli.py
+++ b/tests/test_cli/test_cli.py
@@ -35,8 +35,8 @@ def test_basicScene(python_version):
@pytest.mark.skip_end_to_end
def test_WriteStuff(python_version):
"""This is mainly intended to test the caching process of the tex objects"""
- path_basic_scene = os.path.join("tests", "tests_data", "basic_scenes.py")
- path_output = os.path.join("tests", "tests_cache", "media_temp")
+ path_basic_scene = os.path.join("tests_data", "basic_scenes.py")
+ path_output = os.path.join("tests_cache", "media_temp")
command = [python_version, "-m", "manim", path_basic_scene,
"WriteStuff", "-l", "--media_dir", path_output]
out, err, exitcode = capture(command)
diff --git a/tests/test_movements.py b/tests/test_movements.py
index 7aa7e4b8f..1079a240a 100644
--- a/tests/test_movements.py
+++ b/tests/test_movements.py
@@ -6,7 +6,7 @@ class HomotopyTest(Scene):
def construct(self):
def func(x, y, z, t):
norm = get_norm([x, y])
- tau = interpolate(5, -5, t) + norm/FRAME_X_RADIUS
+ 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()
diff --git a/tests/tests_cache/writing/TextTest/Text/space.svg b/tests/tests_cache/writing/TextTest/Text/space.svg
index 4de22d4ed..04356bce9 100644
--- a/tests/tests_cache/writing/TextTest/Text/space.svg
+++ b/tests/tests_cache/writing/TextTest/Text/space.svg
@@ -3,14 +3,14 @@
<defs>
<g>
<symbol overflow="visible" id="glyph0-0">
-<path style="stroke:none;" d="M 1.25 0 L 1.25 -6.25 L 6.25 -6.25 L 6.25 0 Z M 1.40625 -0.15625 L 6.09375 -0.15625 L 6.09375 -6.09375 L 1.40625 -6.09375 Z M 1.40625 -0.15625 "/>
+<path style="stroke:none;" d="M 1 -6.875 L 6.5 -6.875 L 6.5 0 L 1 0 Z M 1.375 -6.515625 L 1.375 -0.375 L 6.125 -0.375 L 6.125 -6.515625 Z M 1.375 -6.515625 "/>
</symbol>
<symbol overflow="visible" id="glyph0-1">
-<path style="stroke:none;" d="M -0.152344 1.988281 L -0.152344 1.351563 L 5.671875 1.351563 L 5.671875 1.988281 Z M -0.152344 1.988281 "/>
+<path style="stroke:none;" d="M -0.15625 1.984375 L -0.15625 1.359375 L 5.671875 1.359375 L 5.671875 1.984375 Z M -0.15625 1.984375 "/>
</symbol>
</g>
</defs>
-<g id="surface72">
+<g id="surface27">
<g style="fill:rgb(0%,0%,0%);fill-opacity:1;">
<use xlink:href="#glyph0-1" x="30" y="20"/>
</g>