TDD vs Unit Testing vs BDD: How They Differ and When to Use Each
A unit test is code that checks one small piece of software. Test-driven development (TDD) is a way of working where you write that test before the code. This guide compares TDD, unit testing and BDD, walks through a pytest example and explains when test-first development pays off.