Skip to content

Commit

Permalink
🔧 Tweak pytest coverage (fastapi#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo authored and alexreg committed Nov 6, 2022
1 parent 33c719e commit 0b48ea0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ${@}

0 comments on commit 0b48ea0

Please sign in to comment.