Notes

Source: 📖 Test Driven Development with Python ch3 p22


Unit Tests vs Functional Tests

The difference between unit tests and functional tests is perspective—unit tests test the inner workings of the code, from the programmer's perspective, whereas functional tests test the app from the outside, from the user's perspective.

The aim is for functional tests to drive the development from a high level—this is the top of the testing pyramid. They ensure that our app does what we intend it to do, and that we don't break it in the development process. Unit tests, on the other hand, test our code at a lower level—they are there to ensure that our code remains clean and bug-free.