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.

0 of 10 lessons passed

Start lesson 1

Lessons

Progress and your code are kept in this browser only.

  1. Assert numerical results with a tolerance
  2. Inspect a captured exception contract
  3. Check calls against a real signature
  4. Restore a patched attribute reliably
  5. Verify awaited dependencies
  6. Test retry behaviour without waiting
  7. Run a fixture and its teardown
  8. Make one test reject several bad implementations
  9. Assert a log record without scraping a console
  10. Check stdout and stderr separately

All courses