(self)
| 795 | p1.children -= ["c", "d"] |
| 796 | |
| 797 | def test_set_comparisons(self): |
| 798 | Parent = self.classes.Parent |
| 799 | |
| 800 | p1 = Parent("P1") |
| 801 | p1.children = ["a", "b", "c"] |
| 802 | control = {"a", "b", "c"} |
| 803 | |
| 804 | for other in ( |
| 805 | {"a", "b", "c"}, |
| 806 | {"a", "b", "c", "d"}, |
| 807 | {"a"}, |
| 808 | {"a", "b"}, |
| 809 | {"c", "d"}, |
| 810 | {"e", "f", "g"}, |
| 811 | set(), |
| 812 | ): |
| 813 | eq_(p1.children.union(other), control.union(other)) |
| 814 | eq_(p1.children.difference(other), control.difference(other)) |
| 815 | eq_((p1.children - other), (control - other)) |
| 816 | eq_(p1.children.intersection(other), control.intersection(other)) |
| 817 | eq_( |
| 818 | p1.children.symmetric_difference(other), |
| 819 | control.symmetric_difference(other), |
| 820 | ) |
| 821 | eq_(p1.children.issubset(other), control.issubset(other)) |
| 822 | eq_(p1.children.issuperset(other), control.issuperset(other)) |
| 823 | |
| 824 | self.assert_((p1.children == other) == (control == other)) |
| 825 | self.assert_((p1.children != other) == (control != other)) |
| 826 | self.assert_((p1.children < other) == (control < other)) |
| 827 | self.assert_((p1.children <= other) == (control <= other)) |
| 828 | self.assert_((p1.children > other) == (control > other)) |
| 829 | self.assert_((p1.children >= other) == (control >= other)) |
| 830 | |
| 831 | def test_set_comparison_empty_to_empty(self): |
| 832 | # test issue #3265 which was fixed in Python version 2.7.8 |
nothing calls this directly
no test coverage detected