Skip to content

Commit

Permalink
Introduce flaky to cover some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evamaxfield committed Dec 5, 2023
1 parent 623871b commit c1c8469
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cdp_backend/tests/utils/test_file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import imageio
import pytest
import requests_mock
from flaky import flaky
from requests import HTTPError

from cdp_backend.utils import file_utils
Expand Down Expand Up @@ -344,6 +345,7 @@ def test_convert_video_to_mp4(
# (EXAMPLE_M3U8_PLAYLIST_URI, None),
],
)
@flaky(max_runs=3, min_passes=1)
def test_remote_resource_copy(
resources_dir: Path,
uri: str,
Expand All @@ -359,7 +361,7 @@ def test_remote_resource_copy(

os.remove(actual_uri)

time.sleep(5)
time.sleep(10)


def test_invalid_uri() -> None:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ test = [
"pytest>=5.4.3",
"pytest-cov>=2.9.0",
"pytest-raises>=0.11",
"flaky>=3.7.0",
# Extras
"networkx>=2.5",
"pydot>=1.4",
Expand Down

0 comments on commit c1c8469

Please sign in to comment.