Commit dbc0f21a authored by Kamlesh Todai's avatar 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
......@@ -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)
......
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