Skip to content

Commit

Permalink
ci(appveyor): rerun test failures up to five times
Browse files Browse the repository at this point in the history
Some tests are not robust, and we do not want to run after them all the
time. Ultimately, the should be marked individually:

```py
@pytest.mark.flaky(reruns=5)
def test_example():
    ...
```

Refs: https://pypi.org/project/pytest-rerunfailures/#re-run-individual-failures
  • Loading branch information
mih committed Sep 23, 2024
1 parent 936e478 commit 0e0f8a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ for:
- echo TMPDIR=$TMPDIR
# not ready for doctests yet, some are invalid
# 'hatch run tests.py${PY}:run-cov --doctest-modules --durations 20 -m "not (turtle)" -k "$KEYWORDS" --pyargs ${DTS}'
- 'hatch run tests.py${PY}:run-cov --durations 20 -m "not (turtle)" -k "$KEYWORDS" --pyargs ${DTS}'
- 'hatch run tests.py${PY}:run-cov --reruns 5 --reruns-delay 5 --durations 20 -m "not (turtle)" -k "$KEYWORDS" --pyargs ${DTS}'

after_test:
- 'hatch run tests.py${PY}:cov-combine'
Expand Down Expand Up @@ -393,7 +393,7 @@ for:
# run test selection
# not ready for doctests yet, some are invalid
# 'hatch run tests.py%PY%:run-cov --doctest-modules --durations 20 -m "not (turtle)" -k "%KEYWORD%" --pyargs %DTS%'
- cmd: 'hatch run tests.py%PY%:run-cov --durations 20 -m "not (turtle)" -k "%KEYWORD%" --pyargs %DTS%'
- cmd: 'hatch run tests.py%PY%:run-cov --reruns 5 --reruns-delay 5 --durations 20 -m "not (turtle)" -k "%KEYWORD%" --pyargs %DTS%'

after_test:
- cmd: 'hatch run tests.py%PY%:cov-combine'
Expand Down

0 comments on commit 0e0f8a3

Please sign in to comment.