From 7ed433030488c348ed38c100e70439237577cfdb Mon Sep 17 00:00:00 2001 From: Michael Hanke Date: Sun, 22 Sep 2024 19:38:27 +0200 Subject: [PATCH] ci(appveyor): rerun test failures up to five times 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 --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 462e9971..7bf5607f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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' @@ -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'