2 ms·
You can create regression tests that prove that the code does what it does today - which helps you understand it, provides a readable description of what it doe
by simonw 5y ago
You can create regression tests that prove that the code does what it does today - which helps you understand it, provides a readable description of what it does and protects against regression bugs in the future.
Here's a relevant trick I frequently use for this kind of work with Python: https://simonwillison.net/2020/Feb/11/cheating-at-unit-tests-pytest-black/ https://simonwillison.net/2020/Feb/11/cheating-at-unit-tests...