From c951797e7dba3c42d0df81a3fa7769661430a619 Mon Sep 17 00:00:00 2001 From: Hauke Schulz <43613877+observingClouds@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:09:36 +0100 Subject: [PATCH] improve dask distributed test --- tests/test_distributed.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_distributed.py b/tests/test_distributed.py index a7b6a9c..3b7a957 100644 --- a/tests/test_distributed.py +++ b/tests/test_distributed.py @@ -25,10 +25,15 @@ def distributed(): @pytest.mark.parametrize( - "args", [["example.danra.yaml", "--dask-distributed-local-core-fraction", "0.1"]] + "args", [["example.danra.yaml", "--dask-distributed-local-core-fraction", "0.1"], ["example.danra.yaml"]] ) def test_run_distributed(args): - if distributed(): + if distributed() and "--dask-distributed-local-core-fraction" in args: + pytest.raises( + ZeroDivisionError, + call_wrapper(args), + match="division by zero", + elif distributed(): call_wrapper(args) else: pytest.raises(