skinnybeans / python-testing

small project to show different ways of using python mocks and patching for tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python testing tutorial

Set up

  1. Create virtual environment: python -m venv .venv --prompt pytest-tutorial
  2. Activate the virtual environment: source .venv/bin/activate
  3. Install the tutorial module: pip install -e .
  4. Install other dependencies: pip install -r requirements.txt
  5. Run the tests pytest -v -s

Take a look through tests/test_mocks.py for various ways on using python mocks and patching to test things.

About

small project to show different ways of using python mocks and patching for tests


Languages

Language:Python 100.0%