diff --git a/pyproject.toml b/pyproject.toml index f60a0d1..d3107ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,8 @@ tests = [ ] dev = [ "dvc-task[tests,docs]", - "celery-types", + "celery-types; python_version > '3.9'", + "celery-types==0.15.0; python_version < '3.9'", "mypy==1.9.0" ] diff --git a/tests/worker/test_temporary.py b/tests/worker/test_temporary.py index 66dd518..2ff7166 100644 --- a/tests/worker/test_temporary.py +++ b/tests/worker/test_temporary.py @@ -28,10 +28,7 @@ def test_start(celery_app: Celery, mocker: MockerFixture): thread.assert_called_once_with(target=worker.monitor, daemon=True, args=(name,)) -@pytest.mark.flaky( - max_runs=3, - rerun_filter=lambda *args: sys.platform == "darwin", -) +@pytest.mark.flaky(reruns=3, condition=sys.platform == "darwin") def test_start_already_exists( celery_app: Celery, celery_worker: WorkController, @@ -46,10 +43,7 @@ def test_start_already_exists( thread.assert_not_called() -@pytest.mark.flaky( - max_runs=3, - rerun_filter=lambda *args: sys.platform == "darwin", -) +@pytest.mark.flaky(reruns=3, condition=sys.platform == "darwin") def test_monitor( celery_app: Celery, celery_worker: WorkController,