Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test_platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wallen姚文辉
test_platform
Commits
21a727cf
Commit
21a727cf
authored
Apr 22, 2025
by
Wallen姚文辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复类覆盖不对的bug
parent
02de1b1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
a.py
a.py
+0
-4
codeCover.py
controller/codeCover.py
+4
-4
No files found.
a.py
deleted
100644 → 0
View file @
02de1b1d
res
=
'[]'
for
i
in
range
(
18
):
res
+=
";err"
print
(
res
)
\ No newline at end of file
controller/codeCover.py
View file @
21a727cf
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment