Skip to content

Commit 6309513

Browse files
committed
BF: allow for int type string in ls on BE begin with <i
1 parent 9909550 commit 6309513

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nibabel/tests/test_scripts.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77
from __future__ import division, print_function, absolute_import
88

9+
import sys
910
import os
1011
from os.path import (dirname, join as pjoin, abspath, splitext, basename,
1112
exists)
@@ -97,7 +98,9 @@ def test_nib_ls_multiple():
9798

9899
# they should be indented correctly. Since all files are int type -
99100
ln = max(len(f) for f in fnames)
100-
assert_equal([l[ln:ln+2] for l in stdout_lines], [' i']*4,
101+
little_endian = sys.byteorder == 'little'
102+
assert_equal([l[ln:ln+2+int(not little_endian)] for l in stdout_lines],
103+
[' i']*4 if little_endian else [' <i']*4,
101104
msg="Type sub-string didn't start with 'i'. "
102105
"Full output was: %s" % stdout_lines)
103106
# and if disregard type indicator which might vary

0 commit comments

Comments
 (0)