From 3f2f80db4d706c1435c9904b867430641cb06719 Mon Sep 17 00:00:00 2001 From: wql Date: Tue, 22 Oct 2024 17:22:07 +0800 Subject: [PATCH] chore: add sort results for mindie --- mindie/sort_results.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 mindie/sort_results.py diff --git a/mindie/sort_results.py b/mindie/sort_results.py new file mode 100644 index 00000000..53730066 --- /dev/null +++ b/mindie/sort_results.py @@ -0,0 +1,28 @@ +import os + +RESULTS_PATH = r"C:\Users\wengq\Desktop\QY项目\mindie_test_results" + + + +def main(): + + tp1_result = "" + tp8_result = "" + + for dirpath, dirnames, filenames in os.walk(RESULTS_PATH): + + for filename in filenames: + if "tp1_result" in filename: + with open(os.path.join(dirpath, filename), 'r', encoding='utf-8') as file: + file.readline() + tp1_result += file.readline() + elif "tp8_result" in filename: + with open(os.path.join(dirpath, filename), 'r', encoding='utf-8') as file: + file.readline() + tp8_result += file.readline() + + print(tp1_result) + print(tp8_result) + +if __name__ == "__main__": + main()