Skip to content

Commit 0f8188f

Browse files
committed
fix(test): add importorskip guard for S3 optional dependencies
The S3 artifact tests require aioboto3 and botocore which are only installed with the [s3] extra. CI runs with --extra test only, so these tests fail with ModuleNotFoundError on collection. Adding pytest.importorskip() at module level gracefully skips the entire test file when the S3 dependencies aren't available.
1 parent c564f5d commit 0f8188f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/unittests/artifacts/test_s3_artifact_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
from google.genai import types
2929
import pytest
3030

31+
pytest.importorskip("aioboto3")
32+
pytest.importorskip("botocore")
3133

3234

3335
FIXED_DATETIME = datetime(2025, 1, 1, 12, 0, 0, tzinfo=timezone.utc)

0 commit comments

Comments
 (0)