Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
read-pointfile-writefile-dat
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸大学计算机学院
教师群组
宋海霞-shx
Test
casegroup
template
read-pointfile-writefile-dat
提交
e6035236
提交
e6035236
4月 12, 2021
创建
作者:
宋海霞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交作业
上级
fb01b31c
流水线
#156454
已失败 于阶段
用时 9 秒
变更
1
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
+4
-0
test.py
.vscode/test.py
+4
-0
没有找到文件。
.vscode/test.py
浏览文件 @
e6035236
...
...
@@ -55,13 +55,16 @@ def compare_file(file1, file2, seqNum, caseCount, bCI, resultFileType, dsType):
returnVal
=
0
if
file1
==
""
or
file2
==
""
:
print
(
'文件路径不能为空:第一个文件的路径:{0}, 第二个文件的路径:{1} .'
.
format
(
file1
,
file2
))
sys
.
stdout
.
flush
()
sys
.
exit
()
else
:
print
(
"正在比较标准答案结果文件 {0} 和用户编写的应用程序结果文件 {1}"
.
format
(
file1
,
file2
),
end
=
': '
)
sys
.
stdout
.
flush
()
if
os
.
path
.
isfile
(
file1
)
and
os
.
path
.
isfile
(
file2
):
comResult
=
0
if
resultFileType
==
ResultFileType
.
writedat
:
print
(
"advanced_dat_file_compare"
)
comResult
=
advanced_dat_file_compare
(
file1
,
file2
)
else
:
comResult
=
advanced_file_compare
(
file1
,
file2
)
...
...
@@ -127,6 +130,7 @@ def outputPromptInfo(bCI, promptInfo, color):
print
(
yellow
(
promptInfo
))
else
:
print
(
promptInfo
)
sys
.
stdout
.
flush
()
else
:
if
color
==
Color
.
green
:
print
(
Fore
.
GREEN
+
promptInfo
,
file
=
stream
)
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论