def test__func(self): for case in test_data: A = case["input"] with self.subTest(f"A = {A}"): self.assertEqual( case["solution"], func(A))
def test__func(self): for case in test_data: A, B = case["input"]["max_loss"], case["input"]["contest_array"] with self.subTest(f"\nA = {A}\n\tB = {B}"): self.assertEqual(case["solution"], func(A, B))
def test__func(self): for case in test_data: ratio, arr = case["input"] with self.subTest(f"\nratio = {ratio}\narr = {arr}"): self.assertEqual(case["solution"], func(ratio, arr))
def test__func(self): for case in test_data: initial = case["input"] with self.subTest(f"\nA = {initial}\n"): self.assertEqual(case["solution"], func(initial))