From 27997e10069fbe3f5bb64627a957e289f6e91ef1 Mon Sep 17 00:00:00 2001 From: Aidan Griffiths Date: Thu, 2 Nov 2023 16:15:28 +1100 Subject: [PATCH] chore: coverage report is handled by pytest-cov by default --- .github/workflows/python-app.yml | 10 ++++------ pyproject.toml | 4 +--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 007b9c9e..c4c0b9f2 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -29,15 +29,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest pip install .[all] - name: Test with pytest run: | - pip install pytest pytest-cov - coverage run -m pytest - - name: Report test coverage - run: | - coverage report -m + # editable is necessary as pytest will run against the installed + # package rather than the local files creating a coverage report of 0% + pip install -e . + pytest tests/ --cov=src/ - name: Test tutorial notebooks with pytest run: | pytest --nbmake tutorials/ diff --git a/pyproject.toml b/pyproject.toml index b8dd685d..3773c868 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,11 +86,9 @@ source = ["/src/"] [tool.pytest.ini_options] addopts = [ - '--cov-fail-under=100', + '--cov-fail-under=99', '--cov-branch', - '--cov-report=html', '--cov-report=term-missing', - '--junitxml=report.xml', # Ignore notebooks which depend on external data for E2E tests '--ignore=tutorials/First_Data_Fetching.ipynb', '--ignore=tutorials/Mean_Squared_Error.ipynb',