From 0b48ea088510e1b73f35c986be88305641c8128b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 5 Nov 2022 15:25:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Tweak=20pytest=20coverage=20(#48?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 5 +++++ scripts/test.sh | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 247116aef7..e5e1bced03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,11 @@ jobs: - name: Install Flit run: pip install flit - name: Install Dependencies + if: ${{ matrix.python-version != '3.6' }} + run: python -m flit install --symlink + - name: Install Dependencies + if: ${{ matrix.python-version == '3.6' }} + # This doesn't install the editable install, so coverage doesn't get subprocesses run: python -m pip install ".[test]" - name: Lint run: bash scripts/lint.sh diff --git a/scripts/test.sh b/scripts/test.sh index fc566b8c08..c96ae3a8f9 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -4,5 +4,5 @@ set -e set -x bash ./scripts/test-files.sh -# Use xdist-pytest --forked to ensure modified sys.path to import relative modules in examples keeps working -pytest --cov=typer --cov=tests --cov=docs_src --cov-report=term-missing -o console_output_style=progress --numprocesses=auto ${@} +# It seems xdist-pytest ensures modified sys.path to import relative modules in examples keeps working +pytest --cov-config=.coveragerc --cov --cov-report=term-missing -o console_output_style=progress --numprocesses=auto ${@}