„Tets_Python/Main.py“ ändern

main
Gideon Regehr 2023-05-09 11:48:17 +02:00
parent c1ddda4493
commit 6f0408e7b8
1 changed files with 58 additions and 58 deletions

View File

@ -9,11 +9,11 @@ class Main:
if __name__ == "__main__": if __name__ == "__main__":
filename = "resources/SmallTest.txt" filename = "resources/Pi_ausgabe_2mal_TimeInSeconds_0_40_asTXT (1).txt"
with open(filename, "rb") as f: with open(filename, "rb") as f:
binary_data = f.read().strip() binary_data = f.read().strip()
filename = "resources/data2.txt" filename = "resources/Pi_ausgabe_2mal_TimeInSeconds_0_40_asTXT (1).txt"
with open(filename, "rb") as f: with open(filename, "rb") as f:
binary_data2 = f.read().strip() binary_data2 = f.read().strip()
@ -23,14 +23,14 @@ if __name__ == "__main__":
print("p_value:", result[0]) print("p_value:", result[0])
print("test passed (p_value >= 0.01):", result[1]) print("test passed (p_value >= 0.01):", result[1])
result = StartUPTest.test5(binary_data2) result = StartUPTest.autocorrelation_test(binary_data2)
print("Z_tau:", result[0]) print("Z_tau:", result[0])
print("test passed (Z_tau > 2326 and Z_tau < 2674):", result[1]) print("test passed (Z_tau > 2326 and Z_tau < 2674):", result[1])
# Call the TotalFailure-Test # Call the TotalFailure-Test
print("Total Failure:") print("Total Failure:")
result = TotOnline.total_failure(binary_data, pattern_length=10) result = TotOnline.total_failure_test(binary_data, pattern_length=10)
print("p_value:", result[0]) print("p_value:", result[0])
print("test passed (p_value >= 0.01):", result[1]) print("test passed (p_value >= 0.01):", result[1])
@ -41,7 +41,7 @@ if __name__ == "__main__":
print("test passed (p_value >= 0.01):", result[1]) print("test passed (p_value >= 0.01):", result[1])
print("Block Frequency:") print("Block Frequency:")
result = TotOnline.block_frequency(binary_data) result = TotOnline.block_frequency_test(binary_data)
print("p_value:", result[0]) print("p_value:", result[0])
print("test passed (p_value >= 0.01):", result[1]) print("test passed (p_value >= 0.01):", result[1])