@@ -690,24 +690,6 @@ def test_bad_input(self, tmp_path):
690690 ):
691691 encoder .to_tensor (format = "bad_format" )
692692
693- # @pytest.mark.parametrize("method", ["to_file", "to_tensor", "to_file_like"])
694- # @pytest.mark.parametrize("codec", ["h264", "hevc", "av1", "libx264", None])
695- # def test_codec_valid_values(self, method, codec, tmp_path):
696- # if method == "to_file":
697- # valid_params = {"dest": str(tmp_path / "test.mp4")}
698- # elif method == "to_tensor":
699- # valid_params = {"format": "mp4"}
700- # elif method == "to_file_like":
701- # valid_params = dict(file_like=io.BytesIO(), format="mp4")
702- # else:
703- # raise ValueError(f"Unknown method: {method}")
704-
705- # encoder = VideoEncoder(
706- # frames=torch.zeros((5, 3, 128, 128), dtype=torch.uint8),
707- # frame_rate=30,
708- # )
709- # getattr(encoder, method)(**valid_params, codec=codec)
710-
711693 @pytest .mark .parametrize ("method" , ("to_file" , "to_tensor" , "to_file_like" ))
712694 def test_pixel_format_errors (self , method , tmp_path ):
713695 frames = torch .zeros ((5 , 3 , 64 , 64 ), dtype = torch .uint8 )
@@ -1022,7 +1004,13 @@ def write(self, data):
10221004 ("mp4" , "hevc" ),
10231005 ("mkv" , "av1" ),
10241006 ("avi" , "mpeg4" ),
1025- ("webm" , "vp9" ),
1007+ pytest .param (
1008+ "webm" ,
1009+ "vp9" ,
1010+ marks = pytest .mark .skipif (
1011+ IS_WINDOWS , reason = "vp9 codec not available on Windows"
1012+ ),
1013+ ),
10261014 ],
10271015 )
10281016 def test_codec_parameter_utilized (self , tmp_path , format , codec_spec ):
@@ -1043,7 +1031,13 @@ def test_codec_parameter_utilized(self, tmp_path, format, codec_spec):
10431031 [
10441032 ("h264" , "libx264" ),
10451033 ("av1" , "libaom-av1" ),
1046- ("vp9" , "libvpx-vp9" ),
1034+ pytest .param (
1035+ "vp9" ,
1036+ "libvpx-vp9" ,
1037+ marks = pytest .mark .skipif (
1038+ IS_WINDOWS , reason = "vp9 codec not available on Windows"
1039+ ),
1040+ ),
10471041 ],
10481042 )
10491043 def test_codec_spec_vs_impl_equivalence (self , tmp_path , codec_spec , codec_impl ):
0 commit comments