Skip to content
Merged
Changes from all commits
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
9 changes: 7 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ def pytest_collection_modifyitems(items):
needs_cuda = item.get_closest_marker("needs_cuda") is not None
needs_ffmpeg_cli = item.get_closest_marker("needs_ffmpeg_cli") is not None
has_skip_marker = item.get_closest_marker("skip") is not None
has_skipif_marker = item.get_closest_marker("skipif") is not None

# For skipif, the marker is always present regardless of whether the
# condition is True or False, so we must check the actual condition.
skipif_condition_is_true = any(
skipif_marker.args[0] for skipif_marker in item.iter_markers("skipif")
)

if in_fbcode():
# fbcode doesn't like skipping tests, so instead we just don't collect the test
# so that they don't even "exist", hence the continue statements.
if needs_ffmpeg_cli or has_skip_marker or has_skipif_marker:
if needs_ffmpeg_cli or has_skip_marker or skipif_condition_is_true:
continue

if (
Expand Down
Loading