-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds a simple test for remote s3 datasets
Checks the number of files in an example openneuro s3 dataset. Also adds s3fs as a test dependency.
- Loading branch information
Showing
2 changed files
with
27 additions
and
0 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
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 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), | ||
], | ||
) | ||
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