23
23
from ...wrapstruct import WrapStructError
24
24
from ... import imageglobals
25
25
26
- from nose .tools import assert_true , assert_false
26
+
27
+ import pytest
27
28
28
29
from numpy .testing import (assert_equal , assert_array_equal ,
29
30
assert_array_almost_equal , assert_almost_equal ,
@@ -260,7 +261,7 @@ def test_eq():
260
261
hdr2 = MGHHeader ()
261
262
assert_equal (hdr , hdr2 )
262
263
hdr .set_data_shape ((2 , 3 , 4 ))
263
- assert_false (hdr = = hdr2 )
264
+ assert (hdr ! = hdr2 )
264
265
hdr2 .set_data_shape ((2 , 3 , 4 ))
265
266
assert_equal (hdr , hdr2 )
266
267
@@ -287,7 +288,7 @@ def test_mgh_load_fileobj():
287
288
bio = io .BytesIO (contents )
288
289
fm = MGHImage .make_file_map (mapping = dict (image = bio ))
289
290
img2 = MGHImage .from_file_map (fm )
290
- assert_true (img2 .dataobj .file_like is bio )
291
+ assert (img2 .dataobj .file_like is bio )
291
292
assert_array_equal (img .get_fdata (), img2 .get_fdata ())
292
293
293
294
@@ -477,7 +478,7 @@ def test_as_byteswapped(self):
477
478
# same code just returns a copy
478
479
for endianness in BIG_CODES :
479
480
hdr2 = hdr .as_byteswapped (endianness )
480
- assert_false (hdr2 is hdr )
481
+ assert (hdr2 is not hdr )
481
482
assert_equal (hdr2 , hdr )
482
483
483
484
# Different code raises error
0 commit comments