You need to sign in to do that
Don't have an account?
Phillip Moseley
Code Coverage Error despite our Code Coverage being 77%
Our code coverage is saying that we're at 77%, but when we try to deploy we're getting a code coverage error back that says we are only at 74% coverage. Why would it give us that we are 77%, but then when we try to deploy we get this error of only 74% coverage?
Thanks for your help in advance!
Phillip
Thanks for your help in advance!
Phillip
if a:
d = 0
else:
d = 2
if b:
x = 2/d
else:
x = d/2
return x
# These tests give 100% coverage:
two_branches(False, False) == 1
two_branches(True, False) == 0
two_branches(False, True) == 1
# This test fails with a ZeroDivisionError:
two_branches(True, True)