From af85e2814387ac8d08f583b64070e9664fe3b17c Mon Sep 17 00:00:00 2001 From: Ian Thomas Date: Mon, 20 May 2024 21:37:32 +0100 Subject: [PATCH] Label flaky test (#385) --- pyproject.toml | 1 + tests/test_config.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 5d4377be..b066adc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,6 +64,7 @@ test-no-images = [ # Dependencies to run tests excluding image-generating tests. "pytest", "pytest-cov", + "pytest-rerunfailures", "pytest-xdist", "wurlitzer", ] diff --git a/tests/test_config.py b/tests/test_config.py index 116f1bcf..bcb15e86 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -35,6 +35,7 @@ def test_config_filled(show_text: bool, name: str) -> None: @pytest.mark.image @pytest.mark.text +@pytest.mark.flaky(reruns=1, condition=platform.python_implementation().startswith("PyPy")) @pytest.mark.parametrize("show_text", [False, True]) @pytest.mark.parametrize("name", util_test.quad_as_tri_names()) def test_config_filled_quad_as_tri(show_text: bool, name: str) -> None: