Skip to content

Commit 1bb4804

Browse files
committed
test: Fix coverage reporting
By adding the current working directory to the `sys.path`. Run via `python -m pytest` (not `py.test`) so the working directory is on `sys.path`, and coverage measures the local `injector/` rather than the copy installed in site-packages. Otherwise coverage reports 0%. See pytest-dev/pytest-cov#98
1 parent bc0b08a commit 1bb4804

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
pip install .
3535
- name: Run tests
3636
run: |
37-
py.test -vv --cov=injector --cov-branch --cov-report html --cov-report term
37+
python -m pytest -vv --cov=injector --cov-branch --cov-report html --cov-report term
3838
if which mypy; then mypy injector ; fi
3939
if which black; then black --check . ; fi
4040
check-manifest

0 commit comments

Comments
 (0)