(self)
| 878 | raise |
| 879 | |
| 880 | def test_bulk_replace(self): |
| 881 | Parent = self.classes.Parent |
| 882 | |
| 883 | p1 = Parent("foo") |
| 884 | p1.children = {"a", "b", "c"} |
| 885 | assocs = set(p1._children) |
| 886 | keep_assocs = {a for a in assocs if a.name in ("a", "c")} |
| 887 | eq_(len(keep_assocs), 2) |
| 888 | remove_assocs = {a for a in assocs if a.name == "b"} |
| 889 | |
| 890 | p1.children = {"a", "c", "d"} |
| 891 | eq_({a for a in p1._children if a.name in ("a", "c")}, keep_assocs) |
| 892 | assert not remove_assocs.intersection(p1._children) |
| 893 | |
| 894 | eq_(p1.children, {"a", "c", "d"}) |
| 895 | |
| 896 | |
| 897 | class CustomSetTest(SetTest): |
nothing calls this directly
no test coverage detected