Intro to Testing and Test Automation in Python
Clone or download
Pull request Compare This branch is 5 commits behind keeppythonweird:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
catinabox
examples
pics
steps
tests
.coveragerc
.gitignore
.travis.yml
LICENSE
README.md
pytest.ini
requirements.txt
setup.py
test_requirements.txt

README.md

catinabox - Intro to Testing and Test Automation in Python

Build Status

Coverage status:

Accompanies the Intro to Testing and Test Automation in Python slide deck. Aesthetic inspired by @sailorhg.

catinabox

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:

Requirements

  1. Github accounts
  2. Python (2.7 or 3.x) with:
  • pip
  • virtualenv
  1. Git (either Github for Windows or command-line git)
  2. Text editor or IDE (e.g. Pycharm)

Tutorial Steps

  1. Setup and run tests
  2. Test a simple function
  3. Create and build a pull request
  4. Testing incorrect input
  5. Testing classes with fixtures
  6. Using mock and patch
  7. Parameterized tests
  8. Refactoring for unit testability

Solutions are visible by viewing the solutions branch.

cattery