Skip to content

Commit

Permalink
Make tests ignore order of files
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Apr 9, 2024
1 parent bf958de commit cf04c26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nwb2bids/test/test_reformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ def test_reformat_all(nwb_testdata, tmp_path):
for root, dirs, files in os.walk(tmp_path):
if root == tmp_path:
assert dirs == ['sub-1234']
assert files == ['participants.json', 'participants.tsv']
assert set(files) == set(['participants.json', 'participants.tsv'])
if root == os.path.join(tmp_path, 'sub-1234'):
assert dirs == ['ses-20240309']
assert files == ['sessions.json', 'sessions.tsv']
assert set(files) == set(['sessions.json', 'sessions.tsv'])
if root == os.path.join(tmp_path, 'sub-1234', 'ses-20240309'):
assert dirs == ['ephys']
assert files == []
if root == os.path.join(tmp_path, 'sub-1234', 'ses-20240309', 'ephys'):
assert dirs == []
assert files == ['sub-1234contacts.tsv', 'sub-1234channels.tsv', 'sub-1234_ses-20240309_ephys.nwb', 'sub-1234probes.tsv']
assert set(files) == set(['sub-1234contacts.tsv', 'sub-1234channels.tsv', 'sub-1234_ses-20240309_ephys.nwb', 'sub-1234probes.tsv'])

0 comments on commit cf04c26

Please sign in to comment.