Skip to content

Commit f8d03ad

Browse files
author
Daniel Flores
committed
windows + webm test skips
1 parent dfa2265 commit f8d03ad

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/test_ops.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import os
1010
from functools import partial
1111

12-
from .utils import get_ffmpeg_major_version, in_fbcode
12+
from .utils import get_ffmpeg_major_version, in_fbcode, IS_WINDOWS
1313

1414
os.environ["TORCH_LOGS"] = "output_code"
1515
import json
@@ -1311,8 +1311,15 @@ def decode(self, file_path) -> torch.Tensor:
13111311
@pytest.mark.parametrize("format", ("mov", "mp4", "avi", "mkv", "webm", "flv"))
13121312
def test_video_encoder_test_round_trip(self, tmp_path, format):
13131313
ffmpeg_version = get_ffmpeg_major_version()
1314-
if ffmpeg_version == 4 and format == "webm":
1315-
pytest.skip("Codec for webm is not available in the FFmpeg4 installation.")
1314+
if format == "webm":
1315+
if ffmpeg_version == 4:
1316+
pytest.skip(
1317+
"Codec for webm is not available in the FFmpeg4 installation."
1318+
)
1319+
if IS_WINDOWS and ffmpeg_version in (6, 7):
1320+
pytest.skip(
1321+
"Codec for webm is not available in the FFmpeg6/7 installation on Windows."
1322+
)
13161323
asset = NASA_VIDEO
13171324
# Test that decode(encode(decode(asset))) == decode(asset)
13181325
source_frames = self.decode(str(asset.path)).data

0 commit comments

Comments
 (0)