NOTE: course material and description being updated
See also web testing
1 day course on testing practises and principles with pytest
- virtual environments and pipenv (installing pytest)
- pytest command line for collecting and running tests
- Simple test functions and asserts
- Test fixtures and conftest.py
- Testing exceptions with
pytest.raises
- Test parameterisation for test combinations
- Test marking for running test subsets
- Principles of testing (unit tests versus end to end testing, building test helpers etc)
- Mocking and patching
- Building test frameworks and suites
- Testing API servers with Flask and pytest test client
- Selenium or Playwright for browser automation
- httpx or requests for API clients
To add:
- More detail on testing principles
- Update to uv instead of pipenv
This course is taught by Michael Foord. Michael has been teaching Python for over a decade and has over twenty years industry experience as an application developer. Michael is a Python core developer and the creator of unittest.mock in the Python standard library, and is the author of The Absolute Minimum Every Python Web Application Developer Must Know About Security.