tests: skip minio-dependent tests when minio is not installed#1309
tests: skip minio-dependent tests when minio is not installed#1309sarpit2907 wants to merge 2 commits intodatajoint:masterfrom
Conversation
| {"id": 2, "key": 6}, | ||
| {"id": 2, "key": 5}, | ||
| {"id": 1, "key": 5}, | ||
| {"id": 2, "key": 5}, |
There was a problem hiding this comment.
We will not need to fix this since .fetch does not preserve order in this case. This is related to #1242 We have addressed this in DataJoint 2.0 (in review now).
|
Thanks for raising this! DataJoint 2.0 (on the Current 2.0 Approach
Additional ImprovementYour suggestion to use @pytest.fixture(scope="session")
def minio_container():
if USE_EXTERNAL_CONTAINERS:
yield None
return
MinioContainer = pytest.importorskip("testcontainers.minio").MinioContainer
...This would gracefully skip instead of failing during fixture setup. Would you like to submit a PR targeting the |
|
Hi @sarpit2907, thank you for this contribution! We're closing this PR because DataJoint 2.0 uses testcontainers which automatically manages MySQL and MinIO containers during tests. This means:
The contributor experience improvement you aimed for is achieved through a different approach - testcontainers provides a cleaner solution than skipping tests. See the updated test infrastructure in PR #1312. |
|
Closing in favor of DataJoint 2.0's testcontainers approach. Thank you for your contribution! |
This change replaces the hard dependency on
minioduring test collectionwith
pytest.importorskip, so tests are skipped gracefully when the optionaldependency is not installed.
This improves the contributor experience and prevents pytest collection
failures due to missing optional test dependencies.