Ejemplo n.º 1
0
 def test_location_no_overlap_1digit(self):
     self.assertEqual(d.location([9, 0], [7, 1]), 0)
     self.assertEqual(d.location([9, 0], [7, 2]), 0)
     self.assertEqual(d.location([5, 1], [8, 0]), 0)
     self.assertEqual(d.location([5, 2], [8, 0]), 0)
Ejemplo n.º 2
0
 def test_location_no_overlap_2digit(self):
     self.assertEqual(d.location([10, 0], [22, 2]), 0)
     self.assertEqual(d.location([10, 2], [22, 0]), 0)
Ejemplo n.º 3
0
 def test_location_overlap_2digit(self):
     self.assertEqual(d.location([10, 0], [22, 1]), -1)
     self.assertEqual(d.location([10, 1], [22, 0]), -1)
Ejemplo n.º 4
0
 def test_location_same_loc_reversed_1_2_digits(self):
     self.assertEqual(d.location([5, 4], [23, 3]), -1)
     self.assertEqual(d.location([23, 3], [5, 4]), -1)
Ejemplo n.º 5
0
 def test_location_same_loc_1digit(self):
     self.assertEqual(d.location([5, 0], [8, 0]), -1)
Ejemplo n.º 6
0
 def test_location_same_loc_2digit(self):
     self.assertEqual(d.location(stim(10, 0), stim(22, 0)), -2)