提交 5c35315d 创建 作者: 305350171@qq.com's avatar 305350171@qq.com

modify

上级 0eebe6a9
*.exe
*.o
*.bak
result_comparation.html
\ No newline at end of file
result_comparation.html
user_output*.txt
\ No newline at end of file
......@@ -15,6 +15,23 @@
"problemMatcher": "$msCompile"
},
{
"label": "安装pip包(setup pip package)",
"type": "shell",
"windows": {
"command": "pip install -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt"
},
"linux": {
"command": "pip3 install -i https://mirrors.aliyun.com/pypi/simple/ -r requirements.txt"
},
"args": [],
"group": "build",
"presentation": {
"reveal": "always",
"group": "setup_pip_package"
},
"problemMatcher": "$msCompile"
},
{
"label": "测试(test)",
"type": "shell",
"windows": {
......
# -*- coding: utf-8 -*-
###### 不要列出标准库中已包含的包,例如:Math,time等,如果列出将出现如下错误:######
###### RuntimeError: Package '**' must not be downloaded from pypi ######
numpy
\ No newline at end of file
......@@ -10,6 +10,8 @@ import filecmp
import subprocess
import platform
print("输出安装pip包的提示信息")
from colorama import Fore, init, AnsiToWin32
init(wrap=False)
stream = AnsiToWin32(sys.stderr).stream
......@@ -80,11 +82,11 @@ def compare_file(file1, file2, seqNum, caseCount, bIncludeCi):
if os.path.isfile(file1) and os.path.isfile(file2) and advanced_file_compare(file1, file2):
print("文件相同")
score = 60
score = 40
if seqNum == caseCount:
score = 100
else:
score = score + 40 / caseCount * seqNum
score = score + 60 / caseCount * seqNum
if bIncludeCi :
promptInfo = "Case{0} 验证成功".format(seqNum)
......@@ -94,6 +96,9 @@ def compare_file(file1, file2, seqNum, caseCount, bIncludeCi):
promptInfo = "Case{0} 验证成功, 分数: {1}".format(seqNum, int(score))
outputPromptInfo(bIncludeCi, promptInfo, 1)
if seqNum == caseCount:
print("恭喜你,通过了所有的测试!")
returnVal = 1
return returnVal
else:
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论