From 529e0bb6c779c0556092411054e453c07eb14cf4 Mon Sep 17 00:00:00 2001 From: Hanspeter Schaub Date: Sat, 14 Dec 2024 16:20:13 -0700 Subject: [PATCH] error if expected test is skipped --- .github/workflows/pull-request.yml | 6 +++--- requirements.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ea215f20c3..70b8b3a60d 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -121,7 +121,7 @@ jobs: - name: "Run Python Tests" run: | source .venv/bin/activate - cd src && pytest -n auto -m "not ciSkip" -rs --fail-on-skip + cd src && pytest -n auto -m "not ciSkip" -rs --error-for-skips - name: "Run C/C++ Tests" working-directory: ./dist3 @@ -206,7 +206,7 @@ jobs: Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name MPLBACKEND -Value ${MPLBACKEND} venv\Scripts\activate cd src - pytest -n auto -m "not ciSkip" -rs --fail-on-skip + pytest -n auto -m "not ciSkip" -rs --error-for-skips if(($LastExitCode -ne 0) -and ($LastExitCode -ne 5)) {exit 1} - name: "C/C++ Tests" if: ${{ always() }} @@ -249,7 +249,7 @@ jobs: run: | source .venv/bin/activate cd src - pytest -n auto -m "not ciSkip" -rs --fail-on-skip + pytest -n auto -m "not ciSkip" -rs --error-for-skips if: ${{ always() }} - name: "Run C/C++ Tests" working-directory: ./dist3 diff --git a/requirements.txt b/requirements.txt index 43668dea11..11b040aacb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,5 @@ Pillow pytest pytest-html pytest-xdist +pytest-error-for-skips requests