Python has a few of these things, which is really sad.
Python has a few of these things, which is really sad.
the tests are only as good as the code they're written with, and as good as the code review process they were merged under.
It avoids replicating the same category of errors in both the test and the code under test, especially when some calculation or some sub-tests generation is made in the test.
Also, the obvious solution is self-testing code. (Jokes aside, structures like code contracts attempt something like this).
You could say that about anything and everything in software.
It's not acceptable that testing needs to be run for something the language should 100% accommodate.
The whole point of the language is to provide algorithmic clarity and avoid these things.
This isn't really an issue of 'trade offs' is just a bad feature of the language that should have been remedied more than a decade ago.
The lack of proper declaration of variables is even more absurd, there's only downside to that.