Broken Tests

djberg96 on 2003-08-27T20:46:18

Lowrey's Law states, "If it jams, force it. If it breaks, it needed replacing anyway".

There are times when I find myself adopting this philosophy in unit testing. Occasionally a test will fail for no good reason that I can see (like today, when a test caused a segfault), but works fine in a vanilla sample script.

At that point I do one of two things - either A) remove the test and tell myself, "bah, didn't need that test anyway", or B) alter it and tell myself, "yeah, that's it - that's the way it's *supposed* to work".