Commit 21a727cf authored by Wallen姚文辉's avatar Wallen姚文辉

修复类覆盖不对的bug

parent 02de1b1d
res='[]'
for i in range(18):
res+=";err"
print(res)
\ No newline at end of file
......@@ -69,7 +69,7 @@ def getFileCover(key,a1,a2,a3,nowPath):
if i['covered']:
each['cover_function']+=1
each['cover_line']+=len(i['lines'])
executor = ThreadPoolExecutor(max_workers=20)
executor = ThreadPoolExecutor(max_workers=5)
for each in data:
if (nowPath in each['path']):
executor.submit(get_,each)
......@@ -292,9 +292,6 @@ def fileInfo():
q[j]["class"] = "nochange d-flex"
i['add_cover_lines'],i['change_lines'],i['add_cover_function'],i['change_function']=-1,-1,-1,-1
else:
if not (result[0]['add_cover_class']):
result[0]['add_cover_class']=1
result[1]['add_cover_class']=1
i['change_lines']=len(i['lines'])
i['change_function']=1
i['add_cover_function']=i['cover_function']
......@@ -307,6 +304,9 @@ def fileInfo():
if i['cover_function']:
result[0]['add_cover_function']+=1
result[1]['add_cover_function']+=1
if not (result[0]['add_cover_class']):
result[0]['add_cover_class']=1
result[1]['add_cover_class']=1
result.extend(functionInfo)
result = {"coverInfo": result, "all": str(m1).replace('\n',''), "change": str(m2).replace('\n','')}
return jsonify({"code": 200, "message": "请求成功", "data": result}), 200
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment