Skip to content

Commit 2961bf5

Browse files
committed
Moved data for tests.
1 parent d62facc commit 2961bf5

File tree

10 files changed

+11
-12
lines changed

10 files changed

+11
-12
lines changed

nibabel/streamlines/tests/test_streamlines.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from nibabel.externals.six import BytesIO
1010
from nibabel.tmpdirs import InTemporaryDirectory
1111

12+
from nibabel.testing import data_path
1213
from nibabel.testing import clear_and_catch_warnings
1314
from nose.tools import assert_equal, assert_raises, assert_true, assert_false
1415

@@ -17,18 +18,16 @@
1718
from ..tractogram_file import TractogramFile, ExtensionWarning
1819
from .. import trk
1920

20-
DATA_PATH = pjoin(os.path.dirname(__file__), 'data')
21-
2221
DATA = {}
2322

2423

2524
def setup():
2625
global DATA
27-
DATA['empty_filenames'] = [pjoin(DATA_PATH, "empty" + ext)
26+
DATA['empty_filenames'] = [pjoin(data_path, "empty" + ext)
2827
for ext in nib.streamlines.FORMATS.keys()]
29-
DATA['simple_filenames'] = [pjoin(DATA_PATH, "simple" + ext)
28+
DATA['simple_filenames'] = [pjoin(data_path, "simple" + ext)
3029
for ext in nib.streamlines.FORMATS.keys()]
31-
DATA['complex_filenames'] = [pjoin(DATA_PATH, "complex" + ext)
30+
DATA['complex_filenames'] = [pjoin(data_path, "complex" + ext)
3231
for ext in nib.streamlines.FORMATS.keys()]
3332

3433
DATA['streamlines'] = [np.arange(1*3, dtype="f4").reshape((1, 3)),

nibabel/streamlines/tests/test_trk.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from nibabel.externals.six import BytesIO
88

9+
from nibabel.testing import data_path
910
from nibabel.testing import clear_and_catch_warnings
1011
from nose.tools import assert_equal, assert_raises, assert_true
1112
from numpy.testing import assert_array_equal
@@ -18,24 +19,23 @@
1819
from ..trk import TrkFile
1920
from ..header import Field
2021

21-
DATA_PATH = pjoin(os.path.dirname(__file__), 'data')
2222
DATA = {}
2323

2424

2525
def setup():
2626
global DATA
2727

28-
DATA['empty_trk_fname'] = pjoin(DATA_PATH, "empty.trk")
28+
DATA['empty_trk_fname'] = pjoin(data_path, "empty.trk")
2929
# simple.trk contains only streamlines
30-
DATA['simple_trk_fname'] = pjoin(DATA_PATH, "simple.trk")
30+
DATA['simple_trk_fname'] = pjoin(data_path, "simple.trk")
3131
# standard.trk contains only streamlines
32-
DATA['standard_trk_fname'] = pjoin(DATA_PATH, "standard.trk")
32+
DATA['standard_trk_fname'] = pjoin(data_path, "standard.trk")
3333
# standard.LPS.trk contains only streamlines
34-
DATA['standard_LPS_trk_fname'] = pjoin(DATA_PATH, "standard.LPS.trk")
34+
DATA['standard_LPS_trk_fname'] = pjoin(data_path, "standard.LPS.trk")
3535

3636
# complex.trk contains streamlines, scalars and properties
37-
DATA['complex_trk_fname'] = pjoin(DATA_PATH, "complex.trk")
38-
DATA['complex_trk_big_endian_fname'] = pjoin(DATA_PATH,
37+
DATA['complex_trk_fname'] = pjoin(data_path, "complex.trk")
38+
DATA['complex_trk_big_endian_fname'] = pjoin(data_path,
3939
"complex_big_endian.trk")
4040

4141
DATA['streamlines'] = [np.arange(1*3, dtype="f4").reshape((1, 3)),
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)