diff --git a/Python_Tests/TotOnline.py b/Python_Tests/TotOnline.py index d58777b..bd90084 100644 --- a/Python_Tests/TotOnline.py +++ b/Python_Tests/TotOnline.py @@ -8,6 +8,37 @@ from scipy.special import gammaincc as gammaincc class TotOnline: + + @staticmethod + def run_all_tests(binary_data: str): + # Run total_failure_test + p_value, result = TotOnline.total_failure_test(binary_data, 10) + if not result: + return False + + # Run monobit_test + p_value, result = TotOnline.monobit_test(binary_data) + if not result: + return False + + # Run block_frequency_test + p_value, result = TotOnline.block_frequency_test(binary_data, 128) + if not result: + return False + + # Run run_test + p_value, result = TotOnline.run_test(binary_data) + if not result: + return False + + # Run longest_one_block_test + p_value, result = TotOnline.longest_one_block_test(binary_data) + if not result: + return False + + # All tests passed + return True + @staticmethod def total_failure_test(binary_data: str, pattern_length=10):