mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* start test reorganization * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move boolean ops * move more tests * Move more tests * more reorganization * more movements * mostly finish up reorganization * Finish reorganization tests in parent dir * try moving interface tests back * Move test_commands over * fix relative path to templates Co-authored-by: Darylgolden <darylgolden@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
28 lines
673 B
Python
28 lines
673 B
Python
from __future__ import annotations
|
|
|
|
import logging
|
|
|
|
import numpy as np
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
from manim import BackgroundRectangle, Circle, Sector
|
|
|
|
|
|
def test_get_arc_center():
|
|
np.testing.assert_array_equal(
|
|
Sector(arc_center=[1, 2, 0]).get_arc_center(), [1, 2, 0]
|
|
)
|
|
|
|
|
|
def test_BackgroundRectangle(caplog):
|
|
caplog.set_level(logging.INFO)
|
|
c = Circle()
|
|
bg = BackgroundRectangle(c)
|
|
bg.set_style(fill_opacity=0.42)
|
|
assert bg.get_fill_opacity() == 0.42
|
|
bg.set_style(fill_opacity=1, hello="world")
|
|
assert (
|
|
"Argument {'hello': 'world'} is ignored in BackgroundRectangle.set_style."
|
|
in caplog.text
|
|
)
|