9. Testing-and-Debugging¶
- 9.1. Use repr Strings for Debugging Output
- 9.2. Verify Related Behaviors in TestCase Subclasses
- 9.3. AssertionError: Found longer than expected
- 9.4. Isolate Tests from Each Other with setUp, tearDown, setUpModule, and tearDownModule
- 9.5. Use Mocks to Test Code with Complex Dependencies
- 9.6. Encapsulate Dependencies to Facilitate Mocking and Testing
- 9.7. Consider Interactive Debugging with pdb
- 9.8. Use tracemalloc to Understand Memory Usage and Leaks