()
| 749 | |
| 750 | |
| 751 | def 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 | |
| 772 | def test_grouper_private(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…