Skip to content

Commit 71ce5a8

Browse files
committed
[tests] Add deflake for #496
1 parent ebe45af commit 71ce5a8

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

tests/test_video_stream.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,17 @@ def get_test_video_params() -> ty.List[VideoParameters]:
121121
]
122122

123123

124+
_VS_TYPES: list = [vs for vs in (VideoStreamCv2, VideoStreamAv) if vs is not None]
125+
if VideoStreamMoviePy is not None:
126+
_VS_TYPES.append(
127+
pytest.param(
128+
VideoStreamMoviePy,
129+
marks=pytest.mark.flaky(reruns=3, reruns_delay=2, only_rerun=["OSError"]),
130+
)
131+
)
132+
124133
pytestmark = [
125-
pytest.mark.parametrize(
126-
"vs_type",
127-
list(
128-
filter(
129-
lambda x: x is not None,
130-
[
131-
VideoStreamCv2,
132-
VideoStreamAv,
133-
VideoStreamMoviePy,
134-
],
135-
)
136-
),
137-
),
134+
pytest.mark.parametrize("vs_type", _VS_TYPES),
138135
pytest.mark.filterwarnings(MOVIEPY_WARNING_FILTER),
139136
]
140137

0 commit comments

Comments
 (0)