(self)
| 1448 | self.assertTrue(hash(a) == hash(b)) |
| 1449 | |
| 1450 | def test_isdisjoint_Set(self): |
| 1451 | class MySet(Set): |
| 1452 | def __init__(self, itr): |
| 1453 | self.contents = itr |
| 1454 | def __contains__(self, x): |
| 1455 | return x in self.contents |
| 1456 | def __iter__(self): |
| 1457 | return iter(self.contents) |
| 1458 | def __len__(self): |
| 1459 | return len([x for x in self.contents]) |
| 1460 | s1 = MySet((1, 2, 3)) |
| 1461 | s2 = MySet((4, 5, 6)) |
| 1462 | s3 = MySet((1, 5, 6)) |
| 1463 | self.assertTrue(s1.isdisjoint(s2)) |
| 1464 | self.assertFalse(s1.isdisjoint(s3)) |
| 1465 | |
| 1466 | def test_equality_Set(self): |
| 1467 | class MySet(Set): |
nothing calls this directly
no test coverage detected