Python
Testing with unittest
A test is a small program that checks another program. unittest ships with Python, finds your tests automatically and tells you exactly what broke.
Unit testing with unittest, reading tracebacks, pdb, and writing code that stays readable.
3 notes
A test is a small program that checks another program. unittest ships with Python, finds your tests automatically and tells you exactly what broke.
Reading the traceback, forming a hypothesis and checking it. The debugger is a tool; the method is what actually finds the bug.
Code is read far more often than it is written. Consistent style, honest names and clear structure are what make the second reading cheap.