Skip to content

Commit 1987f79

Browse files
committed
changes
2 parents 30a4639 + 2fb977b commit 1987f79

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

for_testing/.coveragerc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[run]
2+
branch = True
3+
source = nibabel, nisext
4+
include = */nibabel/*, */nisext/*
5+
omit =
6+
*/externals/*
7+
*/benchmarks/*
8+
*/tests/*
9+
nibabel/_version.py

nibabel/freesurfer/tests/test_io.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@
3636
data_path = pjoin(nib_data, 'nitest-freesurfer', DATA_SDIR)
3737
have_freesurfer = isdir(data_path)
3838

39+
<<<<<<< HEAD
3940
freesurfer_test = pytest.mark.skipif(not have_freesurfer, reason='cannot find freesurfer {0} directory'.format(DATA_SDIR))
41+
=======
42+
freesurfer_test = pytest.mark.skipif(not have_freesurfer,
43+
reason='cannot find freesurfer {0} directory'.format(DATA_SDIR))
44+
>>>>>>> 2fb977b1605f5a4c4394f3b1b694e0a5e8f66de5
4045

4146
def _hash_file_content(fname):
4247
hasher = hashlib.md5()
@@ -59,10 +64,16 @@ def test_geometry():
5964
surf_path, read_metadata=True, read_stamp=True)
6065

6166
assert 0 == faces.min()
67+
<<<<<<< HEAD
6268
assert coords.shape[0] == (faces.max() + 1)
6369
assert 9 == len(volume_info)
6470
# assert np.array_equal([2, 0, 20],volume_info['head'])
6571
np.testing.assert_array_equal([2, 0, 20],volume_info['head'])
72+
=======
73+
assert coords.shape[0] == faces.max() + 1
74+
assert 9 == len(volume_info)
75+
assert np.array_equal([2, 0, 20], volume_info['head'])
76+
>>>>>>> 2fb977b1605f5a4c4394f3b1b694e0a5e8f66de5
6677
assert create_stamp == ['created by greve on Thu Jun 8 19:17:51 2006'] # this creates assertion error - should we just remove it?
6778

6879
# Test equivalence of freesurfer- and nibabel-generated triangular files
@@ -80,8 +91,12 @@ def test_geometry():
8091
for key in ('xras', 'yras', 'zras', 'cras'):
8192
assert_allclose(volume_info2[key], volume_info[key],
8293
rtol=1e-7, atol=1e-30)
94+
<<<<<<< HEAD
8395
#assert.array_equal(volume_info2['cras'], volume_info['cras'])
8496
np.testing.assert_array_equal(volume_info2['cras'], volume_info['cras'])
97+
=======
98+
assert np.array_equal(volume_info2['cras'], volume_info['cras'])
99+
>>>>>>> 2fb977b1605f5a4c4394f3b1b694e0a5e8f66de5
85100
with open(surf_path, 'rb') as fobj:
86101
np.fromfile(fobj, ">u1", 3)
87102
read_create_stamp = fobj.readline().decode().rstrip('\n')
@@ -156,7 +171,11 @@ def test_write_morph_data():
156171
for shape in okay_shapes:
157172
write_morph_data('test.curv', values.reshape(shape))
158173
# Check ordering is preserved, regardless of shape
174+
<<<<<<< HEAD
159175
assert np.array_equal(read_morph_data('test.curv') ,values)
176+
=======
177+
assert np.array_equal(read_morph_data('test.curv'), values)
178+
>>>>>>> 2fb977b1605f5a4c4394f3b1b694e0a5e8f66de5
160179
with pytest.raises(ValueError):
161180
write_morph_data('test.curv', np.zeros(shape), big_num)
162181
# Windows 32-bit overflows Python int
@@ -166,7 +185,10 @@ def test_write_morph_data():
166185
for shape in bad_shapes:
167186
with pytest.raises(ValueError):
168187
write_morph_data('test.curv', values.reshape(shape))
188+
<<<<<<< HEAD
169189

190+
=======
191+
>>>>>>> 2fb977b1605f5a4c4394f3b1b694e0a5e8f66de5
170192

171193
@freesurfer_test
172194
def test_annot():

0 commit comments

Comments
 (0)