(self)
| 937 | raise |
| 938 | |
| 939 | def test_bulk_replace(self): |
| 940 | Parent = self.classes.Parent |
| 941 | |
| 942 | p1 = Parent("foo") |
| 943 | p1.children = {"a", "b", "c"} |
| 944 | assocs = set(p1._children) |
| 945 | keep_assocs = {a for a in assocs if a.name in ("a", "c")} |
| 946 | eq_(len(keep_assocs), 2) |
| 947 | remove_assocs = {a for a in assocs if a.name == "b"} |
| 948 | |
| 949 | p1.children = {"a", "c", "d"} |
| 950 | eq_({a for a in p1._children if a.name in ("a", "c")}, keep_assocs) |
| 951 | assert not remove_assocs.intersection(p1._children) |
| 952 | |
| 953 | eq_(p1.children, {"a", "c", "d"}) |
| 954 | |
| 955 | |
| 956 | class CustomSetTest(SetTest): |
nothing calls this directly
no test coverage detected