def test_equals_6(self):
     self.assertEqual(
         midpoint_sum([
             1, 1, 1, 1, -5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
             1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
             1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
             1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
             1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
         ]), 52)
 def test_equals_2(self):
     self.assertEqual(midpoint_sum([1, 0, 1]), 1)
 def test_equals(self):
     self.assertEqual(midpoint_sum([4, 1, 7, 9, 3, 9]), 3)
 def test_none_2(self):
     self.assertIsNone(midpoint_sum([0, 0, 1]))
 def test_equals_5(self):
     self.assertEqual(midpoint_sum([-10, 3, 7, 8, -6, -13, 21]), 4)
 def test_equals_3(self):
     self.assertEqual(midpoint_sum([9, 0, 1, 2, 3, 4]), 2)
 def test_equals_4(self):
     self.assertEqual(midpoint_sum([0, 0, 4, 0]), 2)
Exemplo n.º 8
0
 def test_equals(self):
     self.assertEqual(midpoint_sum([4, 1, 7, 9, 3, 9]), 3)
Exemplo n.º 9
0
 def test_equals_2(self):
     self.assertEqual(midpoint_sum([1, 0, 1]), 1)
Exemplo n.º 10
0
 def test_equals_6(self):
     self.assertEqual(
         midpoint_sum(
             [
                 1,
                 1,
                 1,
                 1,
                 -5,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 2,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
                 1,
             ]
         ),
         52,
     )
Exemplo n.º 11
0
 def test_equals_5(self):
     self.assertEqual(midpoint_sum([-10, 3, 7, 8, -6, -13, 21]), 4)
Exemplo n.º 12
0
 def test_equals_4(self):
     self.assertEqual(midpoint_sum([0, 0, 4, 0]), 2)
Exemplo n.º 13
0
 def test_none_2(self):
     self.assertIsNone(midpoint_sum([0, 0, 1]))
Exemplo n.º 14
0
 def test_equals_3(self):
     self.assertEqual(midpoint_sum([9, 0, 1, 2, 3, 4]), 2)