Testing & Debugging
For students who've finished Python II: Deeper Into the Language — a practical process for finding real bugs (reading a traceback backward, print-statement bisection) and writing trustworthy pytest tests, from your first assert to red-green-refactor, one small concept at a time.
Included with a subscription15 modules
Course content
- 1. Glossary
- 2. Bugs Are Normal: A Debugging Mindset
- 3. Reading the Traceback Backward: Finding the Real Cause
- 4. Print-Statement Debugging and Bisection
- 5. Why Test? From assert to pytest
- 6. Writing and Running Your First pytest Tests
- 7. Testing for Errors: pytest.raises
- 8. Organizing a Test Suite
- 9. What Makes a Test Trustworthy
- 10. Thinking in Edge Cases
- 11. Reusable Setup: pytest Fixtures
- 12. Parametrized Tests
- 13. Red, Green, Refactor: Writing a Test First
- 14. Pinning Down a Real Bug With a Test
- 15. Capstone: Debug and Test a Small Program