From a28c0b5460239203157ad0759300f8c6326249fb Mon Sep 17 00:00:00 2001 From: Gideon Regehr <2023558@stud.hs-mannheim.de> Date: Mon, 22 May 2023 11:13:13 +0200 Subject: [PATCH] =?UTF-8?q?Methode=20zum=20Aufruf=20aller=20Tests=20hinzug?= =?UTF-8?q?ef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Python_Tests/StartUpTest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Python_Tests/StartUpTest.py b/Python_Tests/StartUpTest.py index 8154054..64fefeb 100644 --- a/Python_Tests/StartUpTest.py +++ b/Python_Tests/StartUpTest.py @@ -7,6 +7,21 @@ from scipy import stats class StartUPTest: + @staticmethod + def run_all_tests(binary_data: str): + # Run monobit_test + p_value, result = StartUPTest.monobit_test(binary_data) + if not result: + return False + + # Run chi_square + p_value, result, chi2_statistic = StartUPTest.chi_square(binary_data) + if not result: + return False + + # All tests passed + return True + @staticmethod def monobit_test(binary_data: str):