88
99import os
1010import unittest
11- import nose
1211import numpy as np
1312from numpy .testing import (assert_equal , assert_almost_equal , assert_allclose )
1413
2019
2120def _skip_if_no_bioformats ():
2221 if not pims .bioformats .available ():
23- raise nose .SkipTest ('JPype is not installed. Skipping.' )
22+ raise unittest .SkipTest ('JPype is not installed. Skipping.' )
2423
2524
2625def assert_image_equal (actual , expected ):
@@ -187,7 +186,7 @@ class TestBioformatsMOV(_image_series, unittest.TestCase):
187186 def check_skip (self ):
188187 _skip_if_no_bioformats ()
189188 if not os .path .isfile (self .filename ):
190- raise nose .SkipTest ('File missing. Skipping.' )
189+ raise unittest .SkipTest ('File missing. Skipping.' )
191190
192191 def setUp (self ):
193192 self .filename = os .path .join (path , 'bioformats' , 'wtembryo.mov' )
@@ -212,7 +211,7 @@ class TestBioformatsIPW(_image_series, _image_stack, _image_multichannel,
212211 def check_skip (self ):
213212 _skip_if_no_bioformats ()
214213 if not os .path .isfile (self .filename ):
215- raise nose .SkipTest ('File missing. Skipping.' )
214+ raise unittest .SkipTest ('File missing. Skipping.' )
216215
217216 def setUp (self ):
218217 self .filename = os .path .join (path , 'bioformats' , 'mitosis-test.ipw' )
@@ -236,7 +235,7 @@ class TestBioformatsDM3(_image_single, unittest.TestCase):
236235 def check_skip (self ):
237236 _skip_if_no_bioformats ()
238237 if not os .path .isfile (self .filename ):
239- raise nose .SkipTest ('File missing. Skipping.' )
238+ raise unittest .SkipTest ('File missing. Skipping.' )
240239
241240 def setUp (self ):
242241 self .filename = os .path .join (path , 'bioformats' , 'dnasample1.dm3' )
@@ -259,7 +258,7 @@ class TestBioformatsLSM(_image_series, _image_stack, _image_multichannel,
259258 def check_skip (self ):
260259 _skip_if_no_bioformats ()
261260 if not os .path .isfile (self .filename ):
262- raise nose .SkipTest ('File missing. Skipping.' )
261+ raise unittest .SkipTest ('File missing. Skipping.' )
263262
264263 def setUp (self ):
265264 self .filename = os .path .join (path , 'bioformats' , '2chZT.lsm' )
@@ -284,7 +283,7 @@ class TestBioformatsAndorTiff(_image_series, _image_stack, _image_multichannel,
284283 def check_skip (self ):
285284 _skip_if_no_bioformats ()
286285 if not os .path .isfile (self .filename ):
287- raise nose .SkipTest ('File missing. Skipping.' )
286+ raise unittest .SkipTest ('File missing. Skipping.' )
288287
289288 def setUp (self ):
290289 self .filename = os .path .join (path , 'bioformats' , 'MF-2CH-Z-T.tif' )
@@ -309,7 +308,7 @@ class TestBioformatsOlympusTiff(_image_series, _image_stack, unittest.TestCase):
309308 def check_skip (self ):
310309 _skip_if_no_bioformats ()
311310 if not os .path .isfile (self .filename ):
312- raise nose .SkipTest ('File missing. Skipping.' )
311+ raise unittest .SkipTest ('File missing. Skipping.' )
313312
314313 def setUp (self ):
315314 self .filename = os .path .join (path , 'bioformats' , '10-31 E1.tif' )
@@ -337,7 +336,7 @@ class TestBioformatsLIFseries1(_image_single, _image_stack, _image_multichannel,
337336 def check_skip (self ):
338337 _skip_if_no_bioformats ()
339338 if not os .path .isfile (self .filename ):
340- raise nose .SkipTest ('File missing. Skipping.' )
339+ raise unittest .SkipTest ('File missing. Skipping.' )
341340
342341 def setUp (self ):
343342 self .filename = os .path .join (path , 'bioformats' , 'mouse-kidney.lif' )
@@ -367,7 +366,7 @@ class TestBioformatsLIFseries2(_image_single, _image_stack, _image_multichannel,
367366 def check_skip (self ):
368367 _skip_if_no_bioformats ()
369368 if not os .path .isfile (self .filename ):
370- raise nose .SkipTest ('File missing. Skipping.' )
369+ raise unittest .SkipTest ('File missing. Skipping.' )
371370
372371 def setUp (self ):
373372 self .filename = os .path .join (path , 'bioformats' , 'mouse-kidney.lif' )
@@ -390,7 +389,7 @@ class TestBioformatsIPL(_image_single, unittest.TestCase):
390389 def check_skip (self ):
391390 _skip_if_no_bioformats ()
392391 if not os .path .isfile (self .filename ):
393- raise nose .SkipTest ('File missing. Skipping.' )
392+ raise unittest .SkipTest ('File missing. Skipping.' )
394393
395394 def setUp (self ):
396395 self .filename = os .path .join (path , 'bioformats' , 'Blend_Final.IPL' )
@@ -411,7 +410,7 @@ class TestBioformatsSEQ(_image_single, _image_stack, unittest.TestCase):
411410 def check_skip (self ):
412411 _skip_if_no_bioformats ()
413412 if not os .path .isfile (self .filename ):
414- raise nose .SkipTest ('File missing. Skipping.' )
413+ raise unittest .SkipTest ('File missing. Skipping.' )
415414
416415 def setUp (self ):
417416 self .filename = os .path .join (path , 'bioformats' , 'HEART.SEQ' )
@@ -435,7 +434,7 @@ class TestBioformatsLEI(_image_single, _image_stack, unittest.TestCase):
435434 def check_skip (self ):
436435 _skip_if_no_bioformats ()
437436 if not os .path .isfile (self .filename ):
438- raise nose .SkipTest ('File missing. Skipping.' )
437+ raise unittest .SkipTest ('File missing. Skipping.' )
439438
440439 def setUp (self ):
441440 self .filename = os .path .join (path , 'bioformats' , 'leica_stack.lei' )
@@ -460,7 +459,7 @@ class TestBioformatsICS(_image_single, unittest.TestCase):
460459 def check_skip (self ):
461460 _skip_if_no_bioformats ()
462461 if not os .path .isfile (self .filename ):
463- raise nose .SkipTest ('File missing. Skipping.' )
462+ raise unittest .SkipTest ('File missing. Skipping.' )
464463
465464 def setUp (self ):
466465 self .filename = os .path .join (path , 'bioformats' , 'qdna1.ics' )
@@ -483,7 +482,7 @@ class TestBioformatsZPO(_image_stack, _image_multichannel, unittest.TestCase):
483482 def check_skip (self ):
484483 _skip_if_no_bioformats ()
485484 if not os .path .isfile (self .filename ):
486- raise nose .SkipTest ('File missing. Skipping.' )
485+ raise unittest .SkipTest ('File missing. Skipping.' )
487486
488487 def setUp (self ):
489488 self .filename = os .path .join (path , 'bioformats' , 'KEVIN2-3.zpo' )
@@ -547,5 +546,5 @@ def test_metadata_tags(self):
547546 assert 'PixelsPhysicalSizeX' in fields
548547
549548if __name__ == '__main__' :
550- nose .runmodule (argv = [__file__ , '-vvs' ],
549+ unittest .runmodule (argv = [__file__ , '-vvs' ],
551550 exit = False )
0 commit comments