Skip to content

Commit 6d38e8c

Browse files
committed
Added another test that will be failing until #MarcCote#6 is merged.
1 parent 18d3c32 commit 6d38e8c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

nibabel/streamlines/tests/test_tractogram.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,16 @@ def test_tractogram_add_new_data(self):
394394
t.data_per_streamline[::-1],
395395
t.data_per_point[::-1])
396396

397+
# Add new data to a tractogram for which its `streamlines` is a view.
398+
t = Tractogram(DATA['streamlines']*2, affine_to_rasmm=np.eye(4))
399+
t = t[:len(DATA['streamlines'])] # Create a view of `streamlines`
400+
t.data_per_point['fa'] = DATA['fa']
401+
t.data_per_point['colors'] = DATA['colors']
402+
t.data_per_streamline['mean_curvature'] = DATA['mean_curvature']
403+
t.data_per_streamline['mean_torsion'] = DATA['mean_torsion']
404+
t.data_per_streamline['mean_colors'] = DATA['mean_colors']
405+
assert_tractogram_equal(t, DATA['tractogram'])
406+
397407
def test_tractogram_copy(self):
398408
# Create a copy of a tractogram.
399409
tractogram = DATA['tractogram'].copy()

0 commit comments

Comments
 (0)