mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* fix set_value and add some docs * improve font_size property for tex/text_mobject.py * add tests * add more font_size tests * round test_set_value_size) * scale based on self._font_size * add changing_font_size test * rewrite test and add test i forgot to add * improve hacky solution that didn't work * add change font_size test for tex_mobject.py * improve tests * split into separate test * remove component of old test * fix docs * simplify the setter
13 lines
397 B
Python
13 lines
397 B
Python
import pytest
|
|
|
|
from manim.mobject.svg.text_mobject import MarkupText, Text
|
|
|
|
|
|
def test_font_size():
|
|
"""Test that Text and MarkupText return the
|
|
correct font_size value after being scaled."""
|
|
text_string = Text("0").scale(0.3)
|
|
markuptext_string = MarkupText("0").scale(0.3)
|
|
|
|
assert round(text_string.font_size, 5) == 14.4
|
|
assert round(markuptext_string.font_size, 5) == 14.4
|