460
Infallible Code
(lemmy.ml)
Post funny things about programming here! (Or just rant about your favourite programming language.)
Unittest in Python, enjoy! If you pass it with a function like the one in OPs picture, you have earned it.
I don't want unseeded randomness in my tests, ever.
Seed the tests, and making these pass would be trivial.
The right tool for the right job ¯\(ツ)/¯
The right tool here is tests at a level higher than machine code instructions that have been in CPUs since the 70s. Maybe TDD practice is not to test at this level, but every example of TDD sure tends to be something similar!