4 ms·
The irony to me is that the examples he provides for things not to cover are exactly things I think should be covered. Short-circuit logic is ripe for bugs and
by t-writescode 7y ago
The irony to me is that the examples he provides for things not to cover are exactly things I think should be covered. Short-circuit logic is ripe for bugs and the code that causes the short-circuit should definitely be tested!
- dbcurtis 7y agoYes, and exceptions. Tests must tickle all the exception paths. An exception that contains a dumb typo crashes the system instead of propagating up to get handled. Just touching the exception path roots those out. raise ValueError(' '.join('meaningful message with:', parameter) Is a stupid mistake that I still make all too often inside an exception handler.