Test Driven Development (TDD)
Leonardo's Handy Dandy TDD Rules
taken from here:- www.thedigitalcatonline.com/blog/2020/09/10/tdd-in-python-with-pytest-part-1/
- Test first, code later
- Add the reasonably minimum amount of code to pass the test
- You should only have at most one failing test at a time
- Write code that passes the test. Doesn't matter how messy or ugly it is. Get the test passing first, then you can refactor your code.
- A test should fail when you add it. If it doesn't, ask yourself why you are adding it.
- Never refactor without tests.