Block 155: Final Testing & Code Review
Ensure tests pass, code is clean, and edge cases are handled.
Concepts
- Running full test suite with pytest -v
- Code coverage with pytest-cov
- Addressing test failures and edge cases
- Peer code review checklist
Code Examples
See exercise below.
Exercise
Run pytest with coverage report. Aim for >70% coverage on core modules. Fix any test failures. Add 2 more tests for edge cases you hadn't considered.
Homework
Review your own code using this checklist: functions < 20 lines? Descriptive names? No magic numbers? Every function has a test?