3 ms·
You are making my point. It makes no sense to call a sandwich cheaper than a condo when you are evaluating what to buy when looking for a place to live. That is
by michaelmcmillan 10y ago
You are making my point. It makes no sense to call a sandwich cheaper than a condo when you are evaluating what to buy when looking for a place to live. That is what I was pointing out.
Testing and linting does different things. Of course a sandwich is cheaper than a condo, but what does that have to do with what we are talking about?
As for the claim that you can't have unit tests for everything: What do you mean? No, you can't test all branches or combinations in a system, but you can have a 100% test coverage (aka. hitting each line at least once).
- crdoconnor 10y ago>You are making my point. It makes no sense to call a sandwich cheaper than a condo when you are evaluating what to buy when looking for a place to live. That is what I was pointing out. Yeah not really. Both linting and unit tests catch bugs. This is a fact that you refuse to actually face. >you can have a 100% test coverage You can but it's A) a bad idea and B) it won't even necessarily catch the bug that the OP brought up if you do.
- michaelmcmillan 10y agoI grant you that linting catches bugs, but what I've argued for (perhaps badly) is that the bugs it catches are very shallow, but more importantly they make up a relatively small subset of the bugs proper unit tests catch. That's what makes the comparison you made deceptive. I use both linting (pylint actually) and unit tests, so I am not advocating that you should scrap your linting tools. I am just trying to point out the difference. Your B) argument is yet another indication that the tests are not good enough. The example bug OP posted is what made me comment in the first place. If your tests don't catch that your tests are useless.