Skip to content

Commit c51b441

Browse files
committed
add git ci variable, apply to failing test
1 parent b765629 commit c51b441

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

test/test_encoders.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
assert_tensor_close_on_at_least,
1818
get_ffmpeg_major_version,
1919
get_ffmpeg_minor_version,
20+
IN_GIT_CI,
2021
IS_WINDOWS,
2122
NASA_AUDIO_MP3,
2223
needs_ffmpeg_cli,
@@ -1291,3 +1292,8 @@ def test_extra_options_utilized(self, tmp_path, profile, colorspace, color_range
12911292
assert metadata["profile"].lower() == expected_profile
12921293
assert metadata["color_space"] == colorspace
12931294
assert metadata["color_range"] == color_range
1295+
1296+
1297+
@pytest.mark.skipif(IN_GIT_CI, reason="Skipping test in GitHub Actions CI")
1298+
def test_always_fails():
1299+
assert False

test/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from torchcodec.decoders._video_decoder import _read_custom_frame_mappings
1818

1919
IS_WINDOWS = sys.platform in ("win32", "cygwin")
20+
IN_GIT_CI = os.getenv("GITHUB_ACTIONS")
2021

2122

2223
# Decorator for skipping CUDA tests when CUDA isn't available. The tests are

0 commit comments

Comments
 (0)