def test_multiple_minmax(self): self.assertIn( prog_2.sum_min_max( [-89, 1, 90, -89, 2, 90] ), [2, 5, 1, 3] )
def test_negative_test(self): self.assertEqual( prog_2.sum_min_max( [-794, -43, -8989, -11, -89] ), -9000 )
def test_straight_sum(self): self.assertEqual( prog_2.sum_min_max( [1, -6, 0, 34, 434] ), 462 )
def test_float_compatibility(self): self.assertEqual( prog_2.sum_min_max( [1.32, -6.23, 0, 34, 434.001] ), 461.77099999999996 )
def test_reverse_sum(self): self.assertEqual( prog_2.sum_min_max( [1, 434, 0, 34, -6] ), 462 )
def test_two(self): self.assertEqual( prog_2.sum_min_max( [1, 2] ), 3 )
def test_one(self): self.assertEqual( prog_2.sum_min_max( [41] ), 41 )
def test_empty(self): self.assertEqual( prog_2.sum_min_max( [] ), 0 )