From e1cc7567b293c429673d7c7485ea4257084f8b27 Mon Sep 17 00:00:00 2001 From: Oscar Esteban Date: Thu, 29 Aug 2024 16:16:06 +0200 Subject: [PATCH] maint: move testfile to proper location and use fixture --- src/eddymotion/model/tests/__init__.py | 0 {src/eddymotion/model/tests => test}/test_dmri_utils.py | 9 ++++----- 2 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 src/eddymotion/model/tests/__init__.py rename {src/eddymotion/model/tests => test}/test_dmri_utils.py (98%) diff --git a/src/eddymotion/model/tests/__init__.py b/src/eddymotion/model/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/eddymotion/model/tests/test_dmri_utils.py b/test/test_dmri_utils.py similarity index 98% rename from src/eddymotion/model/tests/test_dmri_utils.py rename to test/test_dmri_utils.py index c6c475e7..f5738c22 100644 --- a/src/eddymotion/model/tests/test_dmri_utils.py +++ b/test/test_dmri_utils.py @@ -20,7 +20,6 @@ # # https://www.nipreps.org/community/licensing/ # -from pathlib import Path import numpy as np import pytest @@ -29,8 +28,6 @@ find_shelling_scheme, ) -_datadir = (Path(__file__).parent.parent.parent / "data").absolute() - @pytest.mark.parametrize( ("bvals", "exp_scheme", "exp_bval_groups", "exp_bval_estimated"), @@ -628,8 +625,10 @@ def test_find_shelling_scheme_array(bvals, exp_scheme, exp_bval_groups, exp_bval ), ], ) -def test_find_shelling_scheme_files(dwi_btable, exp_scheme, exp_bval_groups, exp_bval_estimated): - bvals = np.loadtxt(_datadir / f"{dwi_btable}.bval") +def test_find_shelling_scheme_files( + dwi_btable, exp_scheme, exp_bval_groups, exp_bval_estimated, repodata +): + bvals = np.loadtxt(repodata / f"{dwi_btable}.bval") obt_scheme, obt_bval_groups, obt_bval_estimated = find_shelling_scheme(bvals) assert obt_scheme == exp_scheme