(self)
| 1929 | pass # TODO |
| 1930 | |
| 1931 | def test_intersection(self): |
| 1932 | super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets() |
| 1933 | |
| 1934 | # basic set math |
| 1935 | eq_(sub_.intersection(super_), sub_) |
| 1936 | eq_(super_.intersection(sub_), sub_) |
| 1937 | |
| 1938 | # the same sets |
| 1939 | eq_(twin1.intersection(twin2), twin1) |
| 1940 | eq_(twin2.intersection(twin1), twin1) |
| 1941 | |
| 1942 | # empty sets |
| 1943 | empty = util.IdentitySet([]) |
| 1944 | eq_(empty.intersection(empty), empty) |
| 1945 | |
| 1946 | # totally different sets |
| 1947 | eq_(unique1.intersection(unique2), empty) |
| 1948 | |
| 1949 | # not an IdentitySet |
| 1950 | not_an_identity_set = object() |
| 1951 | assert_raises(TypeError, unique1.intersection, not_an_identity_set) |
| 1952 | |
| 1953 | def test_dunder_and(self): |
| 1954 | super_, sub_, twin1, twin2, unique1, unique2 = self._create_sets() |
nothing calls this directly
no test coverage detected