From bc7af920543774e96c5a6d5f1f51ac5df55bf742 Mon Sep 17 00:00:00 2001 From: Oli Date: Mon, 15 Nov 2021 20:10:45 -0300 Subject: [PATCH] rm folder after test --- tests/integration/test.py | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/tests/integration/test.py b/tests/integration/test.py index 77bc32c..4d9e629 100644 --- a/tests/integration/test.py +++ b/tests/integration/test.py @@ -51,19 +51,35 @@ def equal_binaries(path_original, path): diffs = binary_original - binary - comparisons = np.array([abs(x) < 0.001 for x in diffs]) #NO ME DA TAMPOCO CON ESTE ERROR + print("ORIGINAL") + #print(binary_original) + + print("MIO") + #print(binary) + + for i,x in enumerate(diffs): + #print(x) + if (abs(x) > 0.01).any(): + print("fallo") + print("ORIGINAL") + print(binary_original[i][0]) + print("MIO") + print(binary[i][0]) + break + + + comparisons = np.array([(abs(x) < 0.01).all() for x in diffs]) #NO ME DA TAMPOCO CON ESTE ERROR + + return comparisons.all() - if comparisons.all(): - return True - return False binaries = ['Cmap', 'D', 'P', 'V'] def test(): os.chdir('../..') #LO COMENTE PARA EVITAR VOLVER A CORRERLO - #config_file = os.path.abspath("./tests/integration/conf_test.ini") - #os.system("CONFIG_FILE_PATH="+ config_file + " mpirun python mpirunner.py") + config_file = os.path.abspath("./tests/integration/conf_test.ini") + os.system("CONFIG_FILE_PATH="+ config_file + " mpirun python mpirunner.py") #are_equal = are_dir_trees_equal("./tests/integration/tmp_output","./test_loop") @@ -74,8 +90,12 @@ def test(): if not equal_binaries(path_original, path): print("Failure :( on {}".format(i)) + os.system("rm -rf ./tests/integration/tmp_output") + return print("Success!") + os.system("rm -rf ./tests/integration/tmp_output") + -test() \ No newline at end of file +test() \ No newline at end of file