Coverage status:
- Master (test stubs only):
- Solutions branch (all tests added):
Accompanies the Intro to Testing and Test Automation in Python slide deck. Aesthetic inspired by @sailorhg.
This repo holds a tutorial which will walk you through adding unit tests, exploring these features of unit testing in general and pytest in particular:
- Github accounts
- Python (2.7 or 3.x) with:
- pip
- virtualenv
- Git (either Github for Windows or command-line git)
- Text editor or IDE (e.g. Pycharm)
- Setup and run tests
- Test a simple function
- Create and build a pull request
- Testing incorrect input
- Testing classes with fixtures
- Using mock and patch
- Parameterized tests
- Refactoring for unit testability
Solutions are visible by viewing the solutions branch.