Skip to content

Commit

Permalink
Revert commit testing get_suite2p_path()
Browse files Browse the repository at this point in the history
This reverts commit 1e5feb8.
  • Loading branch information
kir0ul committed Apr 2, 2021
1 parent 4b6c3a9 commit dfee703
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,29 @@ def test_save_nwb(replace_ops_save_path_with_local_path, data_folder):

# Remove NWB file
save_folder.joinpath("ophys.nwb").unlink()


@pytest.mark.parametrize(
"input_path, expected_path, success",
[
(
"D:/kjkcc/jodendopn/suite2p/ncconoc/onowcno",
"D:/kjkcc/jodendopn/suite2p",
True,
),
(
"/home/bla/kjkcc/jodendopn/suite2p/ops.npy",
"/home/bla/kjkcc/jodendopn/suite2p",
True,
),
("/etc/bla/kjkcc/jodendopn/suite2p", "/etc/bla/kjkcc/jodendopn/suite2p", True),
("/etc/bla/kjkcc/jodendopn/", "", False),
],
)
def test_get_suite2p_path(input_path, expected_path, success):
if success:
res_path = get_suite2p_path(input_path)
assert res_path == Path(expected_path)
else:
with pytest.raises(FileNotFoundError):
get_suite2p_path(Path(input_path))

0 comments on commit dfee703

Please sign in to comment.