Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions trx/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
fetch_data(get_testing_files_dict(), keys=["gold_standard.zip"])


@pytest.mark.parametrize("path", [("gs.trk"), ("gs.tck"), ("gs.vtk")])
@pytest.mark.parametrize("path", ["gs.trk", "gs.tck", "gs.vtk"])
@pytest.mark.skipif(not dipy_available, reason="Dipy is not installed.")
def test_seq_ops_sft(path):
with TemporaryDirectory() as tmp_dir:
Expand Down Expand Up @@ -53,7 +53,7 @@ def test_seq_ops_trx():
trx_2.close()


@pytest.mark.parametrize("path", [("gs.trx"), ("gs.trk"), ("gs.tck"), ("gs.vtk")])
@pytest.mark.parametrize("path", ["gs.trx", "gs.trk", "gs.tck", "gs.vtk"])
@pytest.mark.skipif(not dipy_available, reason="Dipy is not installed.")
def test_load_vox(path):
from dipy.io.stateful_tractogram import Space
Expand All @@ -72,7 +72,7 @@ def test_load_vox(path):
obj.close()


@pytest.mark.parametrize("path", [("gs.trx"), ("gs.trk"), ("gs.tck"), ("gs.vtk")])
@pytest.mark.parametrize("path", ["gs.trx", "gs.trk", "gs.tck", "gs.vtk"])
@pytest.mark.skipif(not dipy_available, reason="Dipy is not installed.")
def test_load_voxmm(path):
from dipy.io.stateful_tractogram import Space
Expand All @@ -91,7 +91,7 @@ def test_load_voxmm(path):
obj.close()


@pytest.mark.parametrize("path", [("gs.trk"), ("gs.trx"), ("gs_fldr.trx")])
@pytest.mark.parametrize("path", ["gs.trk", "gs.trx", "gs_fldr.trx"])
@pytest.mark.skipif(not dipy_available, reason="Dipy is not installed.")
def test_multi_load_save_rasmm(path):
with TemporaryDirectory() as tmp_gs_dir:
Expand All @@ -117,7 +117,7 @@ def test_multi_load_save_rasmm(path):
obj.close()


@pytest.mark.parametrize("path", [("gs.trx"), ("gs_fldr.trx")])
@pytest.mark.parametrize("path", ["gs.trx", "gs_fldr.trx"])
@pytest.mark.skipif(not dipy_available, reason="Dipy is not installed.")
def test_delete_tmp_gs_dir(path):
gs_dir = os.path.join(get_home(), "gold_standard")
Expand Down Expand Up @@ -158,7 +158,7 @@ def test_delete_tmp_gs_dir(path):
trx3.close()


@pytest.mark.parametrize("path", [("gs.trx")])
@pytest.mark.parametrize("path", ["gs.trx"])
@pytest.mark.skipif(not dipy_available, reason="Dipy is not installed.")
def test_close_tmp_files(path):
gs_dir = os.path.join(get_home(), "gold_standard")
Expand Down Expand Up @@ -196,7 +196,7 @@ def test_close_tmp_files(path):
assert not count


@pytest.mark.parametrize("tmp_path", [("~"), ("use_working_dir")])
@pytest.mark.parametrize("tmp_path", ["~", "use_working_dir"])
def test_change_tmp_dir(tmp_path):
gs_dir = os.path.join(get_home(), "gold_standard")
path = os.path.join(gs_dir, "gs.trx")
Expand All @@ -218,7 +218,7 @@ def test_change_tmp_dir(tmp_path):
assert not os.path.isdir(tmp_gs_dir)


@pytest.mark.parametrize("path", [("gs.trx"), ("gs_fldr.trx")])
@pytest.mark.parametrize("path", ["gs.trx", "gs_fldr.trx"])
def test_complete_dir_from_trx(path):
gs_dir = os.path.join(get_home(), "gold_standard")
path = os.path.join(gs_dir, path)
Expand Down
10 changes: 5 additions & 5 deletions trx/tests/test_memmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,19 @@ def test_load(path, check_dpg, value_error):
assert isinstance(tmm.load(input_obj=path, check_dpg=check_dpg), tmm.TrxFile)


@pytest.mark.parametrize("path", [("small.trx")])
@pytest.mark.parametrize("path", ["small.trx"])
def test_load_zip(path):
path = os.path.join(get_home(), "memmap_test_data", path)
assert isinstance(tmm.load_from_zip(path), tmm.TrxFile)


@pytest.mark.parametrize("path", [("small_fldr.trx")])
@pytest.mark.parametrize("path", ["small_fldr.trx"])
def test_load_directory(path):
path = os.path.join(get_home(), "memmap_test_data", path)
assert isinstance(tmm.load_from_directory(path), tmm.TrxFile)


@pytest.mark.parametrize("path", [("small.trx")])
@pytest.mark.parametrize("path", ["small.trx"])
def test_concatenate(path):
path = os.path.join(get_home(), "memmap_test_data", path)
trx1 = tmm.load(path)
Expand All @@ -192,7 +192,7 @@ def test_concatenate(path):
concat.close()


@pytest.mark.parametrize("path", [("small.trx")])
@pytest.mark.parametrize("path", ["small.trx"])
def test_resize(path):
path = os.path.join(get_home(), "memmap_test_data", path)
trx1 = tmm.load(path)
Expand Down Expand Up @@ -423,7 +423,7 @@ def test_trxfile_close():
pass


@pytest.mark.parametrize("path", [("small.trx")])
@pytest.mark.parametrize("path", ["small.trx"])
def test_close_releases_mmap_from_zip(path):
"""close() must release mmap handles even when loaded via load_from_zip()."""
path = os.path.join(get_home(), "memmap_test_data", path)
Expand Down
Loading