Skip to content

Commit 06313c9

Browse files
demianweffigies
authored andcommitted
Fixed python 2.7 incompatibility in tests
1 parent 58fae01 commit 06313c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nibabel/cifti2/tests/test_cifti2io.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from os.path import join as pjoin, dirname
1212
import sys
13+
import io
1314
from distutils.version import LooseVersion
1415

1516
import numpy as np
@@ -44,7 +45,7 @@
4445
def test_read_nifti2():
4546
filemap = ci.Cifti2Image.make_file_map()
4647
for k in filemap:
47-
filemap[k].fileobj = open(NIFTI2_DATA)
48+
filemap[k].fileobj = io.open(NIFTI2_DATA)
4849
assert_raises(ValueError, ci.Cifti2Image.from_file_map, filemap)
4950

5051
@needs_nibabel_data('nitest-cifti2')

0 commit comments

Comments
 (0)