Skip to content

Conversation

@sarahyurick
Copy link
Contributor

No description provided.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 6, 2026

Greptile Summary

This PR adds the allow_module_level=True parameter to two module-level pytest.skip() calls in the InternVideo test files. This is the correct fix for skipping test modules when optional dependencies are unavailable, ensuring compatibility with pytest's requirements for module-level skip operations.

  • Added allow_module_level=True to pytest.skip() in tests/models/test_internvideo2.py
  • Added allow_module_level=True to pytest.skip() in tests/models/test_internvideo2_mm.py
  • Both changes are identical and follow the same pattern for handling missing InternVideo2 package dependencies
  • No logic or functionality changes - purely addresses test infrastructure requirements

Confidence Score: 5/5

  • This PR is safe to merge with no concerns. The changes are minimal, correct, and follow pytest best practices for module-level skips.
  • Score of 5 reflects that this is a straightforward, low-risk change. The modification adds a required parameter to pytest.skip() calls at module level, which is the correct and standard way to handle optional dependencies. The changes are syntactically correct, semantically appropriate, and address a pytest compatibility requirement. No functionality is affected, no logic is changed, and both modified files are identical in their approach.
  • No files require special attention

Important Files Changed

Filename Overview
tests/models/test_internvideo2.py Added allow_module_level=True to module-level pytest.skip() call. This is the correct way to skip an entire test module when an optional dependency is not available. No issues found.
tests/models/test_internvideo2_mm.py Added allow_module_level=True to module-level pytest.skip() call. This is the correct way to skip an entire test module when an optional dependency is not available. No issues found.

Sequence Diagram

sequenceDiagram
    participant Test as Test Module
    participant ImportError as Import Error
    participant Pytest as pytest.skip()
    participant TestRunner as Test Runner
    
    Test->>Test: Try Import InternVideo2
    Test->>ImportError: ImportError raised
    ImportError->>Pytest: Call pytest.skip()
    Pytest->>Pytest: allow_module_level=True
    Pytest->>TestRunner: Skip entire module
    TestRunner->>TestRunner: Mark module as skipped

Loading

@sarahyurick sarahyurick enabled auto-merge (squash) January 6, 2026 20:29
@sarahyurick sarahyurick merged commit d35babf into NVIDIA-NeMo:main Jan 6, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants