Example #1
0
 def test_overlap_rightpartial2(self):
     """Overlap - Right partial (2)"""
     h = [1, 2, 3, 4, 5]
     n = [4, 5, 6]
     self.assertEqual(calculate_overlap(h, n), [((4, 5), 1)])
Example #2
0
 def test_overlap_rightpartial(self):
     """Overlap - Right partial"""
     h = [4, 5, 6, 7]
     n = [6, 7, 8, 9]
     self.assertEqual(calculate_overlap(h, n), [((6, 7), 1)])
Example #3
0
 def test_overlap_leftpartial2(self):
     """Overlap - Left partial (2)"""
     h = [1, 2, 3, 4, 5]
     n = [0, 1, 2]
     self.assertEqual(calculate_overlap(h, n), [((1, 2), -1)])
Example #4
0
 def test_overlap_none(self):
     """Overlap - None"""
     h = [4, 5, 6, 7]
     n = [8, 9, 10]
     self.assertEqual(calculate_overlap(h, n), [])
Example #5
0
 def test_overlap_leftpartial(self):
     """Overlap - Left partial"""
     h = [4, 5, 6, 7]
     n = [1, 2, 3, 4, 5]
     self.assertEqual(calculate_overlap(h, n), [((4, 5), -1)])
Example #6
0
 def test_overlap_equal(self):
     """Overlap - Equal"""
     h = [4, 5, 6, 7]
     n = [4, 5, 6, 7]
     self.assertEqual(calculate_overlap(h, n), [((4, 5, 6, 7), 2)])
Example #7
0
 def test_overlap_equal(self):
     """Overlap - Equal"""
     h = [4, 5, 6, 7]
     n = [4, 5, 6, 7]
     self.assertEqual(calculate_overlap(h, n), [((4, 5, 6, 7), 2)])
Example #8
0
 def test_overlap_leftfull(self):
     """Overlap - Left full"""
     h = [1, 2, 3, 4, 5]
     n = [1, 2]
     self.assertEqual(calculate_overlap(h, n), [((1, 2), -1)])
Example #9
0
 def test_overlap_rightfull(self):
     """Overlap - Right full"""
     h = [1, 2, 3, 4, 5]
     n = [4, 5]
     self.assertEqual(calculate_overlap(h, n), [((4, 5), 1)])
Example #10
0
 def test_overlap_leftpartial2(self):
     """Overlap - Left partial (2)"""
     h = [1, 2, 3, 4, 5]
     n = [0, 1, 2]
     self.assertEqual(calculate_overlap(h, n), [((1, 2), -1)])
Example #11
0
 def test_overlap_rightpartial2(self):
     """Overlap - Right partial (2)"""
     h = [1, 2, 3, 4, 5]
     n = [4, 5, 6]
     self.assertEqual(calculate_overlap(h, n), [((4, 5), 1)])
Example #12
0
 def test_overlap_rightpartial(self):
     """Overlap - Right partial"""
     h = [4, 5, 6, 7]
     n = [6, 7, 8, 9]
     self.assertEqual(calculate_overlap(h, n), [((6, 7), 1)])
Example #13
0
 def test_overlap_leftpartial(self):
     """Overlap - Left partial"""
     h = [4, 5, 6, 7]
     n = [1, 2, 3, 4, 5]
     self.assertEqual(calculate_overlap(h, n), [((4, 5), -1)])
Example #14
0
 def test_overlap_none(self):
     """Overlap - None"""
     h = [4, 5, 6, 7]
     n = [8, 9, 10]
     self.assertEqual(calculate_overlap(h, n), [])
Example #15
0
 def test_overlap_leftfull(self):
     """Overlap - Left full"""
     h = [1, 2, 3, 4, 5]
     n = [1, 2]
     self.assertEqual(calculate_overlap(h, n), [((1, 2), -1)])
Example #16
0
 def test_overlap_subset(self):
     """Overlap - Subset"""
     h = [4, 5, 6, 7]
     n = [5, 6]
     self.assertEqual(calculate_overlap(h, n), [((5, 6), 0)])
Example #17
0
 def test_overlap_rightfull(self):
     """Overlap - Right full"""
     h = [1, 2, 3, 4, 5]
     n = [4, 5]
     self.assertEqual(calculate_overlap(h, n), [((4, 5), 1)])
Example #18
0
 def test_overlap_subset(self):
     """Overlap - Subset"""
     h = [4, 5, 6, 7]
     n = [5, 6]
     self.assertEqual(calculate_overlap(h, n), [((5, 6), 0)])