diff --git a/environment.yml b/environment.yml index c3b5c70d..f8eee1e1 100644 --- a/environment.yml +++ b/environment.yml @@ -12,6 +12,7 @@ dependencies: - netcdf4 # has history of broken packages on PyPI - pytest - pytest-cov + - pytest-rerunfailures # documentation - autodocsumm - sphinx diff --git a/pyproject.toml b/pyproject.toml index ea687c28..29da3ff6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ test = [ "pytest>6.0.0", "pytest-cov>=2.10.1", "pytest-html!=2.1.0", + "pytest-rerunfailures", "pytest-xdist", "dask", "flake8", diff --git a/tests/test_filter_pipeline_v2.py b/tests/test_filter_pipeline_v2.py index 7acf56fe..f9f117bb 100644 --- a/tests/test_filter_pipeline_v2.py +++ b/tests/test_filter_pipeline_v2.py @@ -17,7 +17,7 @@ def generate_data(): return np.random.rand(100, 100) -@pytest.mark.flaky +@pytest.mark.flaky(reruns=3, only_rerun="ValueError") @pytest.mark.parametrize("chunk_size", [None, (10, 10), (20, 20)], ids=lambda x: f"chunk_{x}") @pytest.mark.parametrize("compression", [None, 9, "lzf"], ids=lambda x: f"compression_{x}") @pytest.mark.parametrize("shuffle", [True, False], ids=lambda x: f"shuffle_{x}")