Skip to content

Developer's Guide

Aditya Kumar edited this page Sep 25, 2020 · 2 revisions

Requirements

Setting up project

# 1. Create a fork of this repository
# 2. Clone your fork
git clone https://github.com/<your-username>/cpcli.git

# 3. Change directory to the cloned directory in your local system
cd cpcli

# 4. Set up a virtual environment
python -m venv venv
source venv/bin/activate # Activate the virtual environment

# 5. Install a project in editable mode
pip install --editable .

# You're good to go! 🥳 

Testing

Running the tests requires tox

Running Tests

  • To run all the tests:
tox
  • To run the tests on a specific tox environment, use -e <name> with an environment name from tox.ini. For example:
# Run only the `typing` tests
tox -e typing

# Run multiple tests
tox -e typing,py,flake8
  • To pass command-line options to pytest, add them after -- in your call to tox. Using -- overrides the default positional arguments defined in tox.ini, so you must include those default positional arguments after -- as well:
tox -e py -- tests/test_<some-test-file>.py
Clone this wiki locally