-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1094 from akhanf/master
FIX: cloud paths checking against patterns
- Loading branch information
Showing
3 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
"""Tests runs layout on bids examples and make sure all files are caught""" | ||
|
||
# TODO | ||
# - add more 'vanilla' datasets | ||
# - missing files in micr? | ||
|
||
import pytest | ||
from botocore.exceptions import NoCredentialsError | ||
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", | ||
[ | ||
(UPath("s3://openneuro.org/ds000102", anon=True), 136), | ||
], | ||
) | ||
@pytest.mark.xfail(raises=NoCredentialsError) | ||
def test_layout_on_s3_datasets_no_derivatives(dataset, nb_files): | ||
layout = BIDSLayout(dataset) | ||
files = layout.get() | ||
assert len(files) == nb_files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters