Skip to content

changhsinlee/pytest-mock-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Samples for using pytest-mock

This repository hosts the code in

Running the code

Requirements

  • Python version >=3.5 is required.

Create environment

After cloning the repository, create a virtual environment in the repository with

python3 -m venv .venv

Then activate the virtual environment and install the repository as a package

# For Macs or Linux
source .venv/bin/activate

# For Windows
.venv\Scripts\activate

# Navigate to where setup.py is
pip install -e .

Running tests

To run the tests, run

# print out the durations for each test
pytest --durations=0