Skip to content

Commit 6be3e94

Browse files
committed
TEST/STY: Alignment in fileutils, floating tests
1 parent 8ed033c commit 6be3e94

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

nibabel/tests/test_fileutils.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def test_read_zt_byte_strings():
3636
# manually rewind
3737
fread.seek(0)
3838
# test readout of two strings
39-
assert (read_zt_byte_strings(fread, 2) ==
40-
[b'test.fmr', b'test.prt'])
39+
assert read_zt_byte_strings(fread, 2) == [b'test.fmr', b'test.prt']
4140
assert fread.tell() == 18
4241
# test readout of more strings than present
4342
fread.seek(0)
@@ -48,6 +47,5 @@ def test_read_zt_byte_strings():
4847
read_zt_byte_strings(fread, 2)
4948
# Try with a small bufsize
5049
fread.seek(0)
51-
assert (read_zt_byte_strings(fread, 2, 4) ==
52-
[b'test.fmr', b'test.prt'])
50+
assert read_zt_byte_strings(fread, 2, 4) == [b'test.fmr', b'test.prt']
5351
fread.close()

nibabel/tests/test_floating.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def test_type_info():
3434
info = np.iinfo(dtt)
3535
infod = type_info(dtt)
3636
assert dict(min=info.min, max=info.max,
37-
nexp=None, nmant=None,
38-
minexp=None, maxexp=None,
39-
width=np.dtype(dtt).itemsize) == infod
37+
nexp=None, nmant=None,
38+
minexp=None, maxexp=None,
39+
width=np.dtype(dtt).itemsize) == infod
4040
assert infod['min'].dtype.type == dtt
4141
assert infod['max'].dtype.type == dtt
4242
for dtt in IEEE_floats + [np.complex64, np.complex64]:
@@ -286,7 +286,6 @@ def test_usable_binary128():
286286
yes = have_binary128()
287287
with np.errstate(over='ignore'):
288288
exp_test = np.longdouble(2) ** 16383
289-
assert (yes ==
290-
(exp_test.dtype.itemsize == 16 and
291-
np.isfinite(exp_test) and
292-
_check_nmant(np.longdouble, 112)))
289+
assert yes == (exp_test.dtype.itemsize == 16 and
290+
np.isfinite(exp_test) and
291+
_check_nmant(np.longdouble, 112))

0 commit comments

Comments
 (0)