From 845bb61dcad91c5d980aa8bdd76ce5501136a43d Mon Sep 17 00:00:00 2001 From: Nicolas Hug Date: Tue, 30 Jul 2024 11:58:19 +0100 Subject: [PATCH] Fix test_write_video_with_audio (#8553) --- test/test_io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_io.py b/test/test_io.py index 0f57da29c27..695fca02169 100644 --- a/test/test_io.py +++ b/test/test_io.py @@ -6,7 +6,7 @@ import pytest import torch import torchvision.io as io -from common_utils import assert_equal +from common_utils import assert_equal, cpu_and_cuda from torchvision import get_video_backend @@ -255,7 +255,7 @@ def test_read_video_partially_corrupted_file(self): assert_equal(video, data) @pytest.mark.skipif(sys.platform == "win32", reason="temporarily disabled on Windows") - @pytest.mark.parametrize("device", ["cpu", "cuda"]) + @pytest.mark.parametrize("device", cpu_and_cuda()) def test_write_video_with_audio(self, device, tmpdir): f_name = os.path.join(VIDEO_DIR, "R6llTwEh07w.mp4") video_tensor, audio_tensor, info = io.read_video(f_name, pts_unit="sec")