def test_sets_not_disjoint_if_element_is_shared(self):
     set1 = CustomSet([1, 2])
     set2 = CustomSet([2, 3])
     self.assertIs(set1.isdisjoint(set2), False)
 def test_sets_disjoint_if_not_elements_are_shared(self):
     set1 = CustomSet([1, 2])
     set2 = CustomSet([3, 4])
     self.assertIs(set1.isdisjoint(set2), True)
 def test_non_empty_set_disjoint_with_empty_set(self):
     set1 = CustomSet([1])
     set2 = CustomSet()
     self.assertIs(set1.isdisjoint(set2), True)
Пример #4
0
 def test_the_empty_set_is_disjoint_with_itself(self):
     set1 = CustomSet()
     set2 = CustomSet()
     self.assertIs(set1.isdisjoint(set2), True)
 def test_sets_disjoint_if_not_elements_are_shared(self):
     set1 = CustomSet([1, 2])
     set2 = CustomSet([3, 4])
     self.assertIs(set1.isdisjoint(set2), True)
 def test_sets_not_disjoint_if_element_is_shared(self):
     set1 = CustomSet([1, 2])
     set2 = CustomSet([2, 3])
     self.assertIs(set1.isdisjoint(set2), False)
 def test_non_empty_set_disjoint_with_empty_set(self):
     set1 = CustomSet([1])
     set2 = CustomSet()
     self.assertIs(set1.isdisjoint(set2), True)