Skip to content

Commit

Permalink
fix celery-types, flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
skshetry committed Mar 25, 2024
1 parent ce6ad40 commit 34dbc1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]

Expand Down
10 changes: 2 additions & 8 deletions tests/worker/test_temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 34dbc1e

Please sign in to comment.