提交 e6035236 创建 作者: 宋海霞's avatar 宋海霞

提交作业

上级 fb01b31c
流水线 #156454 已失败 于阶段
用时 9 秒
...@@ -55,13 +55,16 @@ def compare_file(file1, file2, seqNum, caseCount, bCI, resultFileType, dsType): ...@@ -55,13 +55,16 @@ def compare_file(file1, file2, seqNum, caseCount, bCI, resultFileType, dsType):
returnVal = 0 returnVal = 0
if file1 == "" or file2 == "": if file1 == "" or file2 == "":
print('文件路径不能为空:第一个文件的路径:{0}, 第二个文件的路径:{1} .'.format(file1, file2)) print('文件路径不能为空:第一个文件的路径:{0}, 第二个文件的路径:{1} .'.format(file1, file2))
sys.stdout.flush()
sys.exit() sys.exit()
else: else:
print("正在比较标准答案结果文件 {0} 和用户编写的应用程序结果文件 {1}".format(file1, file2), end=': ') print("正在比较标准答案结果文件 {0} 和用户编写的应用程序结果文件 {1}".format(file1, file2), end=': ')
sys.stdout.flush()
if os.path.isfile(file1) and os.path.isfile(file2): if os.path.isfile(file1) and os.path.isfile(file2):
comResult = 0 comResult = 0
if resultFileType == ResultFileType.writedat: if resultFileType == ResultFileType.writedat:
print("advanced_dat_file_compare")
comResult = advanced_dat_file_compare(file1, file2) comResult = advanced_dat_file_compare(file1, file2)
else: else:
comResult = advanced_file_compare(file1, file2) comResult = advanced_file_compare(file1, file2)
...@@ -127,6 +130,7 @@ def outputPromptInfo(bCI, promptInfo, color): ...@@ -127,6 +130,7 @@ def outputPromptInfo(bCI, promptInfo, color):
print(yellow(promptInfo)) print(yellow(promptInfo))
else: else:
print(promptInfo) print(promptInfo)
sys.stdout.flush()
else: else:
if color == Color.green: if color == Color.green:
print(Fore.GREEN + promptInfo, file = stream) print(Fore.GREEN + promptInfo, file = stream)
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论