You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With branch coverage being introduced there is a curious case of 100% code coverage possible without 100% branch coverage.
Whenever the following code is encountered:
ifa:
pass
it's possible to achieve 100% coverage in the unit test by setting a to True, while never testing the behaviors when a is False. This needs to be rectified, possibly by adding a property specifying a separate branch coverage threshold and enforcing it separately from and in addition to line coverage.
The text was updated successfully, but these errors were encountered:
With branch coverage being introduced there is a curious case of 100% code coverage possible without 100% branch coverage.
Whenever the following code is encountered:
it's possible to achieve 100% coverage in the unit test by setting
a
toTrue
, while never testing the behaviors whena
isFalse
. This needs to be rectified, possibly by adding a property specifying a separate branch coverage threshold and enforcing it separately from and in addition to line coverage.The text was updated successfully, but these errors were encountered: