Skip to content

Conversation

@mollyxu
Copy link
Contributor

@mollyxu mollyxu commented Dec 17, 2025

Remove remaining skipped tests from collection in internal environment

Prevent internal CI failures from skipped tests by excluding skipped tests from collection in internal environment.

TorchCodec tests were flaky / broken internal because:

  • Tests were using runtime pytest.skip() calls, so they were collected but then skipped during execution

Follow up to #1068

Changes Made

1. Replaced most instances of pytest.skip() with @pytest.mark.skipif()

2. Updated conftest.py to document our test collection logic

3. Removed skip that was no longer applicable in test_10bit_videos

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 17, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 19, 2025

@mollyxu has imported this pull request. If you are a Meta employee, you can view this in D89555188.

@mollyxu mollyxu marked this pull request as ready for review December 23, 2025 19:57
# This just validates that we can decode 10-bit videos.
# TODO validate against the ref that the decoded frames are correct

if device == "cuda:beta" and asset is H264_10BITS:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer applicable because the BETA interface fallsback to the CPU now

Copy link
Contributor

@Dan-Flores Dan-Flores left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @mollyxu! Lets focus these changes on the cases where we can simply swap out pytest.skip. I left some comments on the changes where I think the value tradeoff for increased complexity is less clear.

Copy link
Contributor

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Molly, I made a quick pass, this is good! I agree with Daniel's point above that the extra complexity in some places is probably not worth the added benefit.

test/conftest.py Outdated
Comment on lines 44 to 47
# Current we skip all marked tests internally, whether they are marked
# with needs_ffmpeg_cli, skip, or skipif. Future skipped tests
# should follow the pattern of needs_cuda and needs_ffmpeg_cli if we are
# skipping a test because of a dependency.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a bit of trouble understanding this comment, can you clarify what we mean by "follow the pattern of needs_cuda and needs_ffmpeg_cli if we are skipping a test because of a dependency" ?

I think that part of the reason I'm confused is that this mentioned needs_cuda, which isn't used within this if in_fbcode() block - maybe this comment was meant to be somewhere else?

Copy link
Contributor Author

@mollyxu mollyxu Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! The original comment was a bit confusing so I clarified it and moved it to a better section. The intention was to encourage people to follow the decorator pattern for needs_cuda and needs_ffmpeg_cli rather than individual skipwhen we are conditionally skipping tests due to dependencies.

assert_frames_equal(ref_frame3, frames[1].data)
assert_frames_equal(ref_frame5, frames[2].data)

@pytest.mark.skip(reason="TODO: Need video with no pts values.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to also move the related comment block here as well. Starting with "The test video we have ...".

@mollyxu
Copy link
Contributor Author

mollyxu commented Jan 9, 2026

Thanks @Dan-Flores @NicolasHug for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants