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

modify

上级 0eebe6a9
流水线 #152701 已通过 于阶段
用时 35 秒
......@@ -2,3 +2,4 @@
*.o
*.bak
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:
......
  • Developer

    代码质量分析发现了 3 个问题。

    • 0 blocker
    • 🚫 0 critical
    • 0 major
    • 🔽 1 minor
    • 2 info

    注意: 存在下列问题的代码行在本次提交中没有发生变更,无法使用代码行评论的方式进行报告。所以将下列问题汇总显示在这里(点击问题链接可以转到对应的源代码行):

    1. 🔽 Cppcheck cannot find all the include files. Cppcheck can check the code without the include files found. But the results will probably be more accurate if all the include files are found. Please check your project's include directories and add all of them as include directories for Cppcheck. To see what files Cppcheck cannot find use --check-config. (ProjectKey-169403) 📘
    2. keyword 'if' not followed by a single space 📘
    3. keyword 'if' not followed by a single space 📘
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论