Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test/test_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,7 @@ def decode(self, file_path) -> torch.Tensor:
frames, *_ = get_frames_in_range(decoder, start=0, stop=60)
return frames

@pytest.mark.slow
@pytest.mark.parametrize("format", ("mov", "mp4", "mkv", "webm"))
Copy link
Contributor

@NicolasHug NicolasHug Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can "mark" individual entries with arbitrary marks:

Suggested change
@pytest.mark.slow
@pytest.mark.parametrize("format", ("mov", "mp4", "mkv", "webm"))
@pytest.mark.parametrize(
"format", ("mov", "mp4", "mkv", pytest.param("webm", marks=pytest.mark.slow))
)

This is also how we handle our automatic "needs_cuda" mark:

torchcodec/test/utils.py

Lines 29 to 34 in b9cf8d1

def all_supported_devices():
return (
"cpu",
pytest.param("cuda", marks=pytest.mark.needs_cuda),
pytest.param("cuda:0:beta", marks=pytest.mark.needs_cuda),
)

def test_video_encoder_round_trip(self, tmp_path, format):
# Test that decode(encode(decode(asset))) == decode(asset)
Expand Down Expand Up @@ -1422,6 +1423,7 @@ def test_video_encoder_round_trip(self, tmp_path, format):
assert psnr(s_frame, rt_frame) > 30
assert_close(s_frame, rt_frame, atol=atol, rtol=0)

@pytest.mark.slow
@pytest.mark.skipif(in_fbcode(), reason="ffmpeg CLI not available")
@pytest.mark.parametrize(
"format", ("mov", "mp4", "avi", "mkv", "webm", "flv", "gif")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Expand Down
Loading