Skip to content

Commit

Permalink
Retire flaky in favour of pytest-rerunfailures (#1628)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbogunowicz authored and dhuang committed Mar 15, 2024
1 parent f2a06c5 commit 34059c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def _parse_requirements_file(file_path):
"black==22.12.0",
"flake8>=3.8.3",
"isort>=5.7.0",
"flaky~=3.7.0",
"pytest-rerunfailures>=13.0",
"ndjson>=0.3.1",
"wheel>=0.36.2",
"pytest>=6.0.0",
Expand Down
3 changes: 1 addition & 2 deletions tests/deepsparse/pipelines/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from concurrent.futures import ThreadPoolExecutor
from unittest import mock

import flaky
import pytest
from deepsparse.legacy.base_pipeline import BasePipeline

Expand Down Expand Up @@ -125,7 +124,7 @@ def test_pipeline_executor_num_workers():
assert executor._max_workers >= 1


@flaky.flaky(max_runs=2, min_passes=1)
@pytest.mark.flaky(reruns=2, min_passes=1)
@mock_engine(rng_seed=0)
def test_pipeline_call_is_async(engine_mock):
# attempts to verify that pipeline calls to engine are async
Expand Down
6 changes: 3 additions & 3 deletions tests/server/test_legacy_loggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from collections import Counter
from unittest import mock

import pytest
from deepsparse.legacy.loggers import PythonLogger
from deepsparse.legacy.loggers.config import (
PipelineSystemLoggingConfig,
Expand All @@ -30,7 +31,6 @@
from deepsparse.server.deepsparse_server import DeepsparseServer
from deepsparse.server.helpers import server_logger_from_config
from fastapi.testclient import TestClient
from flaky import flaky
from tests.deepsparse.legacy.loggers.helpers import fetch_leaf_logger
from tests.helpers import find_free_port
from tests.test_data.server_test_data import SAMPLE_LOGS_DICT
Expand Down Expand Up @@ -106,7 +106,7 @@ def test_data_logging_from_predefined():
assert log == expected_log


@flaky(max_runs=4, min_passes=3)
@pytest.mark.flaky(reruns=4, min_passes=3)
def test_logging_only_system_info():
server_config = ServerConfig(
endpoints=[EndpointConfig(task=task, name=name, model=stub)],
Expand Down Expand Up @@ -195,7 +195,7 @@ def test_multiple_targets_logging():
)


@flaky(max_runs=3, min_passes=2)
@pytest.mark.flaky(reruns=3, min_passes=2)
def test_function_metric_with_target_loggers():
server_config = ServerConfig(
endpoints=[
Expand Down

0 comments on commit 34059c7

Please sign in to comment.