From 2a495c14538121ad652a455e7d7fe761056fb3eb Mon Sep 17 00:00:00 2001 From: eduard ermakov Date: Sun, 23 Jul 2023 23:00:04 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B6=D0=B0?= =?UTF-8?q?=D1=8E=20=D1=80=D0=B5=D1=88=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B7?= =?UTF-8?q?=D0=B0=D0=B4=D0=B0=D1=87=D0=B8=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5?= =?UTF-8?q?=20=D1=84=D0=B8=D0=B4=D0=B1=D1=8D=D0=BA=D0=B0=20=D0=90=D1=80?= =?UTF-8?q?=D1=82=D1=83=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HNS/Excercises/072023 Test function/main.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/HNS/Excercises/072023 Test function/main.py b/HNS/Excercises/072023 Test function/main.py index 77b94a3..af999eb 100644 --- a/HNS/Excercises/072023 Test function/main.py +++ b/HNS/Excercises/072023 Test function/main.py @@ -19,13 +19,11 @@ def verify_all(dataset): summa_success = int() summa_failed = int() for result in dataset: - result_function = result[0] - result_actual = result[1] - result_expected = result[2] - if result_actual != result_expected: - summa_failed += 1 - else: + verify(result[0], result[1], result[2]) + if verify: summa_success += 1 + else: + summa_failed += 1 print("Total:", len(dataset), "Successful:", summa_success, "Failed:", summa_failed) return True @@ -51,7 +49,7 @@ def max_array(array): array = [2, 3, 5, 8, 89, 65, 75,7895, 2, 1, 1] -dataset = [("Test1", 1, min_array(array)), ("Test2", 7895, max_array(array))] +dataset = [("Test1", 3, min_array(array)), ("Test2", 7895, max_array(array))] verify_all(dataset)