How do you learn to write good unit tests? Asking for a me. (Integration tests too)
However, if your working on a team project; someone's change breaks code without violating a test; you get good feedback (a new test, complaint, or blame). Or, if every little change fails a test but doesn't violate semantics, you get good feedback.
-
-
Yeah, this was prompted by working on Mesa, where a PR passed the tests but broke most of the example models, which is a sign that the tests are.... not great.
-
Ah, yea. I hate that experience. Do you run all the models in your travis? (It reports failure for any executed scripts bad exit code! Really useful for a few of my CLI packages' tests.)
- 2 more replies
New conversation -
-
-
(The latter you can learn on solo projects though.) I guess my whole thing is I want my tests to serialize my *best* understanding of what I built. Hard to get a good loss function on that by yourself.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.