Skip to content

Commit

Permalink
TEST: Use anonymous s3 connnection for test
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 28, 2024
1 parent c9f7c1f commit d96b7b4
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions bids/layout/tests/test_remote_bids.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
""" Tests runs layout on bids examples and make sure all files are caught"""
"""Tests runs layout on bids examples and make sure all files are caught"""

""" TODO
- add more 'vanilla' datasets
- missing files in micr?
"""
# TODO
# - add more 'vanilla' datasets
# - missing files in micr?

import pytest
from upath import UPath

from bids.layout import BIDSLayout

# Values for the number of files by downloading dataset first


@pytest.mark.parametrize(
"dataset, nb_files",
[
("s3://openneuro.org/ds000102", 136),
(UPath("s3://openneuro.org/ds000102", anon=True), 136),
],
)
def test_layout_on_s3_datasets_no_derivatives(dataset, nb_files):
layout = BIDSLayout(dataset)
files = layout.get()
assert len(files) == nb_files

Check warning on line 24 in bids/layout/tests/test_remote_bids.py

View check run for this annotation

Codecov / codecov/patch

bids/layout/tests/test_remote_bids.py#L23-L24

Added lines #L23 - L24 were not covered by tests



0 comments on commit d96b7b4

Please sign in to comment.