Re:Ask HN: What developer tools would you like to see?
by danielvaughn on Sunday May 22, 2022 @12:53PM
(#31470233)
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.
Re:Ask HN: What developer tools would you like to see?
by macintux on Sunday May 22, 2022 @12:37PM
(#31470027)
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.