Skip to content

Commit 4d01aa5

Browse files
authored
Disable failing test on macOS (#1637)
Recently brew upgraded ffmpeg to 5.0 and as such some tests are failing on macOS. This PR disables failing tests on macOS. In order to fix the issue, we will need to upgrade the ffmpeg dependency to 5.0 (a follow up). Signed-off-by: Yong Tang <[email protected]>
1 parent 1c3ac53 commit 4d01aa5

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

tests/test_audio.py

+12
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ def test_audio_io_tensor(audio_data, io_tensor_func):
146146
assert np.all(audio_tensor_value == audio_value_value)
147147

148148

149+
@pytest.mark.skipif(
150+
sys.platform == "darwin",
151+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
152+
)
149153
@pytest.mark.parametrize(
150154
("io_dataset_func"),
151155
[
@@ -176,6 +180,10 @@ def test_audio_io_dataset(audio_data, io_dataset_func):
176180
assert i == 5760
177181

178182

183+
@pytest.mark.skipif(
184+
sys.platform == "darwin",
185+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
186+
)
179187
@pytest.mark.parametrize(
180188
("io_tensor_func", "num_parallel_calls"),
181189
[
@@ -220,6 +228,10 @@ def func(filename, position):
220228
assert item == 2
221229

222230

231+
@pytest.mark.skipif(
232+
sys.platform == "darwin",
233+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
234+
)
223235
@pytest.mark.parametrize(
224236
("io_dataset_func"),
225237
[

tests/test_ffmpeg.py

+16
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ def fixture_audio_path():
3737
)
3838

3939

40+
@pytest.mark.skipif(
41+
sys.platform == "darwin",
42+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
43+
)
4044
def test_ffmpeg_io_tensor_audio(audio_path):
4145
"""test_ffmpeg_io_tensor_audio"""
4246
audio = tfio.IOTensor.from_audio(audio_path)
@@ -78,6 +82,10 @@ def _test_ffmpeg_io_tensor_mkv(video_path):
7882
assert video("v:0").to_tensor().shape == [166, 320, 560, 3]
7983

8084

85+
@pytest.mark.skipif(
86+
sys.platform == "darwin",
87+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
88+
)
8189
def test_ffmpeg_decode_video(video_path):
8290
"""test_ffmpeg_decode_video"""
8391
content = tf.io.read_file(video_path)
@@ -87,13 +95,21 @@ def test_ffmpeg_decode_video(video_path):
8795
assert np.abs(video[0] - video[-1]).sum() > 0
8896

8997

98+
@pytest.mark.skipif(
99+
sys.platform == "darwin",
100+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
101+
)
90102
def test_ffmpeg_decode_video_invalid_content():
91103
"""test_ffmpeg_decode_video_invalid_content"""
92104
content = tf.constant(b"bad-video")
93105
with pytest.raises(tf.errors.InvalidArgumentError):
94106
tfio.experimental.ffmpeg.decode_video(content, 0)
95107

96108

109+
@pytest.mark.skipif(
110+
sys.platform == "darwin",
111+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
112+
)
97113
def test_ffmpeg_decode_video_invalid_index(video_path):
98114
"""test_ffmpeg_decode_video_invalid_index"""
99115
content = tf.io.read_file(video_path)

tests/test_video.py

+8
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def fixture_video_data():
3333
return path, value
3434

3535

36+
@pytest.mark.skipif(
37+
sys.platform == "darwin",
38+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
39+
)
3640
@pytest.mark.parametrize(
3741
("io_dataset_func"),
3842
[
@@ -62,6 +66,10 @@ def test_video_io_dataset(video_data, io_dataset_func):
6266
assert i == 166
6367

6468

69+
@pytest.mark.skipif(
70+
sys.platform == "darwin",
71+
reason="TODO: macOS on GitHub use ffmpeg 5.0, needs update",
72+
)
6573
@pytest.mark.parametrize(
6674
("io_dataset_func"),
6775
[

0 commit comments

Comments
 (0)