I’m trying to run unit tests and coverage on a python repository.
After setting up a virtual environment and installing dependencies, I keep getting a pytest error.
Error here and config.yml here
version: 2
jobs:
build:
docker:
- image: circleci/python:3.9
steps:
- checkout
- run:
name: Build Environment
command: |
python --version
python -m venv advanced-algorithms
source advanced-algorithms/bin/activate
pip install --upgrade pip
pip install pytest-cov
- run:
name: Perform Unit Tests
command: |
export PYTHONPATH=$PWD
pytest -v
coverage report -m
coverage xml
bash <(curl -s https://codecov.io/bash) -f tests/coverage/coverage.xml