manim/tests/module/mobject/geometry/test_unit_geometry.py
ad_chaos 677e88ef96
Refactor tests (#2866)
* 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>
2022-07-09 21:10:30 +00:00

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
)