Re:The Pragmatics of TDD
by njharman on Wednesday March 06, 2013 @04:11PM
(#5333964)
>I don't write tests for getters and setters.
>I don't write tests for member variables.
>I don't write tests for one line functions or functions that are obviously trivial.
I don't disagree, but I often have at least one test that explicitly exercises all of the public interface (of a class/module/whatever). The point is when I change that interface I want tests to break and not have to rely on my memory on what changed when writing release notes / incrementing version number. I mostly test python, YMMV.
I don't disagree, but I often have at least one test that explicitly exercises all of the public interface (of a class/module/whatever). The point is when I change that interface I want tests to break and not have to rely on my memory on what changed when writing release notes / incrementing version number. I mostly test python, YMMV.