Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
Platform Validation
Commits
dbc0f21a
Commit
dbc0f21a
authored
Feb 23, 2021
by
Kamlesh Todai
Browse files
changes to check totalAssertionPassed is non-zero to avoid getting ZeroDivisionError
parent
8737dd30
Pipeline
#28023
failed with stages
in 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Summarize_Newman_Html_Reports.py
View file @
dbc0f21a
...
...
@@ -96,8 +96,11 @@ def processFile(fnm, platform, rowNo, colOffset, envFileNamesPopulated):
elif
(
count
==
20
):
skippedTests
=
info
count
+=
1
# Compute the pass rate (percentage of test that passed for the collection)
passRate
=
(
100
*
(
(
float
(
totalAssertionPassed
)
-
float
(
totalAssertionFailed
))
/
float
(
totalAssertionPassed
)
)
)
# Compute the pass rate (percentage of test that passed for the collection); Avoid ZeroDivisionError
if
(
totalAssertionPassed
>
0
):
passRate
=
(
100
*
(
(
float
(
totalAssertionPassed
)
-
float
(
totalAssertionFailed
))
/
float
(
totalAssertionPassed
)
)
)
else
:
passRate
=
0.0
# print("totalRequestsPassed: " + totalRequestsPassed)
# print("totalRequestsFailed: " + totalRequestsFailed)
...
...
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