Skip to content

Commit 665b28a

Browse files
committed
changed nosetools assertion to pytest in test_mghformat.py
1 parent ae39e06 commit 665b28a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

nibabel/freesurfer/tests/test_mghformat.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
from ...wrapstruct import WrapStructError
2424
from ... import imageglobals
2525

26-
from nose.tools import assert_true, assert_false
26+
27+
import pytest
2728

2829
from numpy.testing import (assert_equal, assert_array_equal,
2930
assert_array_almost_equal, assert_almost_equal,
@@ -260,7 +261,7 @@ def test_eq():
260261
hdr2 = MGHHeader()
261262
assert_equal(hdr, hdr2)
262263
hdr.set_data_shape((2, 3, 4))
263-
assert_false(hdr == hdr2)
264+
assert(hdr != hdr2)
264265
hdr2.set_data_shape((2, 3, 4))
265266
assert_equal(hdr, hdr2)
266267

@@ -287,7 +288,7 @@ def test_mgh_load_fileobj():
287288
bio = io.BytesIO(contents)
288289
fm = MGHImage.make_file_map(mapping=dict(image=bio))
289290
img2 = MGHImage.from_file_map(fm)
290-
assert_true(img2.dataobj.file_like is bio)
291+
assert(img2.dataobj.file_like is bio)
291292
assert_array_equal(img.get_fdata(), img2.get_fdata())
292293

293294

@@ -477,7 +478,7 @@ def test_as_byteswapped(self):
477478
# same code just returns a copy
478479
for endianness in BIG_CODES:
479480
hdr2 = hdr.as_byteswapped(endianness)
480-
assert_false(hdr2 is hdr)
481+
assert(hdr2 is not hdr)
481482
assert_equal(hdr2, hdr)
482483

483484
# Different code raises error

0 commit comments

Comments
 (0)