Skip to content

Commit 7e86cc0

Browse files
committed
Add wildcards to local filesystem transfer tests.
1 parent b2d113e commit 7e86cc0

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

tests/tests_transfers/local_filesystem/test_transfer_special_arguments.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,17 +148,27 @@ def test_wildcards_3(self, pathtable_and_project, upload_or_download):
148148
paths_to_transferred_files = self.perform_transfer(
149149
project, upload_or_download, sub_names, ses_names, datatype
150150
)
151-
breakpoint()
152151

153-
# pathtable = pathtable[pathtable["parent_ses"].fillna("").apply(
154-
# lambda x: fnmatch.fnmatch(x, "ses-002*") or fnmatch.fnmatch(x, "ses-003*")
155-
# )]
152+
pathtable = pathtable[
153+
pathtable["parent_sub"]
154+
.fillna("")
155+
.apply(
156+
lambda x: fnmatch.fnmatch(x, "sub-002*")
157+
or fnmatch.fnmatch(x, "sub-003*")
158+
)
159+
]
160+
161+
pathtable = pathtable[
162+
pathtable["parent_ses"]
163+
.fillna("")
164+
.apply(lambda x: fnmatch.fnmatch(x, "ses-001*"))
165+
]
156166

157-
# pathtable = pathtable[pathtable["parent_datatype"].apply(lambda x: x is not None)]
167+
expected_transferred_paths = sorted(pathtable["path"])
158168

159-
# expected_transferred_paths = sorted(pathtable["path"])
160-
# breakpoint()
161-
# assert sorted(paths_to_transferred_files) == sorted(expected_transferred_paths)
169+
assert sorted(paths_to_transferred_files) == sorted(
170+
expected_transferred_paths
171+
)
162172

163173
def perform_transfer(
164174
self, project, upload_or_download, sub_names, ses_names, datatype

0 commit comments

Comments
 (0)