MCPcopy
hub / github.com/ManimCommunity/manim / test_mobject_remove

Function test_mobject_remove

tests/module/mobject/mobject/test_mobject.py:51–63  ·  view source on GitHub ↗

Test Mobject.remove().

()

Source from the content-addressed store, hash-verified

49
50
51def test_mobject_remove():
52 """Test Mobject.remove()."""
53 obj = Mobject()
54 to_remove = Mobject()
55 obj.add(to_remove)
56 obj.add(*(Mobject() for _ in range(10)))
57 assert len(obj.submobjects) == 11
58 obj.remove(to_remove)
59 assert len(obj.submobjects) == 10
60 obj.remove(to_remove)
61 assert len(obj.submobjects) == 10
62
63 assert obj.remove(Mobject()) is obj
64
65
66def test_mobject_dimensions_single_mobject():

Callers

nothing calls this directly

Calls 3

addMethod · 0.95
removeMethod · 0.95
MobjectClass · 0.90

Tested by

no test coverage detected