66# copyright and license terms.
77#
88### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
9- ''' Tests for is_image / is_header functions '''
9+ ''' Tests for is_image / may_contain_header functions '''
1010from __future__ import division , print_function , absolute_import
1111
1212import copy
2121 Spm2AnalyzeImage , Spm99AnalyzeImage ,
2222 MGHImage , all_image_classes )
2323
24- from nose .tools import assert_true , assert_equal , assert_raises
24+ from nose .tools import assert_true , assert_raises
2525
2626DATA_PATH = pjoin (dirname (__file__ ), 'data' )
2727
@@ -34,7 +34,7 @@ def wat(hdr):
3434 AnalyzeHeader ]
3535 for klass in all_analyze_header_klasses :
3636 try :
37- if klass .is_header (hdr .binaryblock ):
37+ if klass .may_contain_header (hdr .binaryblock ):
3838 return klass
3939 else :
4040 print ('checked completed, but failed.' )
@@ -106,16 +106,16 @@ def check_img(img_path, img_klass, sniff_mode, sniff, expect_success,
106106 """Embedded function to do the actual checks expected."""
107107
108108 if sniff_mode == 'empty' and \
109- hasattr (img_klass .header_class , 'is_header ' ):
110- assert_raises (ValueError , img_klass . header_class . is_header ,
111- sniff )
109+ hasattr (img_klass .header_class , 'may_contain_header ' ):
110+ assert_raises (ValueError ,
111+ img_klass . header_class . may_contain_header , sniff )
112112
113113 if sniff_mode == 'no_sniff' :
114114 # Don't pass any sniff--not even "None"
115- is_img , new_sniff = img_klass .is_image (img_path )
115+ is_img , new_sniff = img_klass .path_maybe_image (img_path )
116116 else :
117117 # Pass a sniff, but don't reuse across images.
118- is_img , new_sniff = img_klass .is_image (img_path , sniff )
118+ is_img , new_sniff = img_klass .path_maybe_image (img_path , sniff )
119119
120120 if expect_success :
121121 # Check that the sniff returned is appropriate.
0 commit comments