Ejemplo n.º 1
0
    def test_no_intersections(self):
        array1 = [1, 2, 4, 5]
        array2 = [3, 3, 3, 3, 3]

        self.assertEqual(list(intersection.right_intersection(array1, array2)),
                         [])
Ejemplo n.º 2
0
 def test_intersection_partial(self):
     array1 = [1, 3, 3, 3, 3, 9]
     array2 = [1, 10]
     self.assertEqual(list(intersection.right_intersection(array1, array2)),
                      [1])
Ejemplo n.º 3
0
 def test_intersection_empty_array(self):
     array1 = [1]
     array2 = []
     self.assertEqual(list(intersection.right_intersection(array1, array2)),
                      [])
Ejemplo n.º 4
0
 def test_intersection_extreme_elements(self):
     array1 = [1, 9]
     array2 = [1, 3, 3, 3, 3, 9]
     self.assertEqual(list(intersection.right_intersection(array1, array2)),
                      [1, 9])
Ejemplo n.º 5
0
 def test_intersection_full(self):
     array1 = [3, 3, 3, 3, 7, 7, 9, 9, 12, 12]
     array2 = [3, 3, 3, 3, 7, 7, 9, 9, 12, 12]
     self.assertEqual(list(intersection.right_intersection(array1, array2)),
                      array1)
    def test_no_intersections(self):
        array1 = [1, 2, 4, 5]
        array2 = [3, 3, 3, 3, 3]

        self.assertEqual(list(intersection.right_intersection(array1, array2)), [])
 def test_intersection_empty_array(self):
     array1 = [1]
     array2 = []
     self.assertEqual(list(intersection.right_intersection(array1, array2)), [])
 def test_intersection_partial(self):
     array1 = [1, 3, 3, 3, 3, 9]
     array2 = [1, 10]
     self.assertEqual(list(intersection.right_intersection(array1, array2)), [1])
 def test_intersection_full(self):
     array1 = [3, 3, 3, 3, 7, 7, 9, 9, 12, 12]
     array2 = [3, 3, 3, 3, 7, 7, 9, 9, 12, 12]
     self.assertEqual(list(intersection.right_intersection(array1, array2)), array1)
 def test_intersection_extreme_elements(self):
     array1 = [1, 9]
     array2 = [1, 3, 3, 3, 3, 9]
     self.assertEqual(list(intersection.right_intersection(array1, array2)), [1, 9])