Skip to content

Commit e5a0987

Browse files
committed
TST: add test for gifti file loading
Test for issue #392 It's a brittle test, because it depends on the order of file loading.
1 parent a6bacdb commit e5a0987

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

nibabel/gifti/tests/test_1.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
""" Testing loading of gifti file
2+
3+
The file is ``test_1`` because we are testing a bug where, if we try to load a
4+
file before instantiating some Gifti objects, loading fails with an
5+
AttributeError (see: https://github.com/nipy/nibabel/issues/392).
6+
7+
Thus, we have to run this test before the other gifti tests to catch the gifti
8+
code unprepared.
9+
"""
10+
11+
from nibabel import load
12+
13+
from .test_parse_gifti_fast import DATA_FILE3
14+
15+
16+
def test_load_gifti():
17+
# This expression should not raise an error
18+
load(DATA_FILE3)

0 commit comments

Comments
 (0)