增加错误的比对,虽然不能完全意料结果,但是可以作为补充,节省精力

This commit is contained in:
2025-09-07 18:44:53 +08:00
parent 1958f196f5
commit a410c7ba67
40 changed files with 3209 additions and 20 deletions

View File

@@ -64,7 +64,7 @@ def compare_files(source_file, target_file):
else:
if src_values[0].strip().lower() == 'x':
if warning_need_recheck == 0:
print(f'[\033[93mWARNING\033[0m] Ignored lines detected. This test case requires manual comparison. \n\t[\033[93mTARGET\033[0m] {target_file}\t[\033[93mSRC\033[0m] {source_file}')
print(f'[\033[93mWARNING\033[0m] Ignored lines detected. This test case requires manual comparison. \n\t[\033[93mTARGET\033[0m] {target_file}\n\t[\033[93mSRC\033[0m] {source_file}')
warning_need_recheck = 1
continue
@@ -96,7 +96,7 @@ def compare_files(source_file, target_file):
#print(f"Line {i+1}, Position {j+1}: Values match ({src_val} == {tgt_val}).")
pass
else:
print(f"\tLine {i+1}, Position {j+1}: Values differ ({src_val} != {tgt_val}).")
#print(f"\tLine {i+1}, Position {j+1}: Values differ ({src_val} != {tgt_val}).")
line_match = False
all_match = False
@@ -155,4 +155,4 @@ if __name__ == "__main__":
if compare_files(src_f, rst_f):
print(f"{outmsg}[\033[92mPASS\033[0m]")
else:
print(f"{outmsg}[\033[91mFAILED\033[0m]")
print(f"{outmsg}[\033[91mFAILED\033[0m]\n\t[\033[91mTARGET\033[0m] {rst_f}\n\t[\033[91mSRC\033[0m] {src_f}")