> I love and hate unit testing. It's a fantastic idea that I've never seen successfully implemented in practice, mostly because the tests invariably fall by the wayside. At the very least, it's a burden to support them.
Are you using object-oriented programming or a more functional style? Without classes, unit tests become a lot more readable and manageable.
Always functional; I'd never try to implement unit testing with classes, that sounds like a nightmare. I'm not talking about the difficulties of writing a unit test, which is where the oop/functional divide is important. I'm talking about the increased time to market, the difficulties of maintaining tests over time, the need to have everyone on the team be equally committed to tdd, etc etc. These are the things that kill good testing practices.
So much this, both in the tested code and in the test code itself. I only started unit testing in Python once I discovered pytest; the built-in unit test framework was such a cognitive mismatch for my usual coding style.
Are you using object-oriented programming or a more functional style? Without classes, unit tests become a lot more readable and manageable.