Web, data & APIs · Course 7 of 8
Testing real Python components
Ten practical lessons on numerical assertions, exception contracts, signature-aware mocks, async dependencies and real pytest suites with fixtures and captured logs.
- 10 lessons
0 of 10 lessons passed
Lessons
Progress and your code are kept in this browser only.
- Assert numerical results with a tolerance
- Inspect a captured exception contract
- Check calls against a real signature
- Restore a patched attribute reliably
- Verify awaited dependencies
- Test retry behaviour without waiting
- Run a fixture and its teardown
- Make one test reject several bad implementations
- Assert a log record without scraping a console
- Check stdout and stderr separately