MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_grouper

Function test_grouper

lib/matplotlib/tests/test_cbook.py:751–769  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

749
750
751def test_grouper():
752 class Dummy:
753 pass
754 a, b, c, d, e = objs = [Dummy() for _ in range(5)]
755 g = cbook.Grouper()
756 g.join(*objs)
757 assert set(list(g)[0]) == set(objs)
758 assert set(g.get_siblings(a)) == set(objs)
759 assert a not in g.get_siblings(a, include_self=False)
760
761 for other in objs[1:]:
762 assert g.joined(a, other)
763
764 g.remove(a)
765 for other in objs[1:]:
766 assert not g.joined(a, other)
767
768 for A, B in itertools.product(objs[1:], objs[1:]):
769 assert g.joined(A, B)
770
771
772def test_grouper_private():

Callers

nothing calls this directly

Calls 5

joinMethod · 0.95
get_siblingsMethod · 0.95
joinedMethod · 0.95
removeMethod · 0.95
DummyClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…