Skip to content

Commit 8209664

Browse files
committed
TEST: Return mutable bytearray from trk_with_bytes
1 parent f5eafcf commit 8209664

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/streamlines/tests/test_trk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_load_complex_file(self):
103103
def trk_with_bytes(self, trk_key='simple_trk_fname', endian='<'):
104104
""" Return example trk file bytes and struct view onto bytes """
105105
with open(DATA[trk_key], 'rb') as fobj:
106-
trk_bytes = fobj.read()
106+
trk_bytes = bytearray(fobj.read())
107107
dt = trk_module.header_2_dtype.newbyteorder(endian)
108108
trk_struct = np.ndarray((1,), dt, buffer=trk_bytes)
109109
trk_struct.flags.writeable = True

0 commit comments

Comments
 (0)