2 ms·
Oh, that's why you inject defects, and if that injection doesn't cause your test to fail, eg because of a try..except Exception, you know that your test is wron
by eru 11y ago
Oh, that's why you inject defects, and if that injection doesn't cause your test to fail, eg because of a try..except Exception, you know that your test is wrong.
(Then you investigate and hopefully remove the catch-all.)
- dllthomas 11y agoBut catch-alls of that form can be correct. This isn't terribly relevant to narrow unit tests, where I should be able to know what I expect to have happened and presumably if an assertion pops it won't have happened, but it makes larger scale fuzzing substantially less useful.