#NEWLINE# def contains_ignoring_case( self , * items ) : #NEWLINE# #INDENT# 'Asserts that val is string and contains the given item or items.' #NEWLINE# if ( not isinstance ( self . val , str_types ) ) : #NEWLINE# #INDENT# raise TypeError ( 'val is not a string' ) #NEWLINE# #UNINDENT# if ( len ( items ) == 0 ) : #NEWLINE# #INDENT# raise ValueError ( 'one or more args must be given' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( items ) == 1 ) : #NEWLINE# #INDENT# if ( not isinstance ( items [ 0 ] , str_types ) ) : #NEWLINE# #INDENT# raise TypeError ( 'given arg must be a string' ) #NEWLINE# #UNINDENT# if ( items [ 0 ] . lower ( ) not in self . val . lower ( ) ) : #NEWLINE# #INDENT# self . _err ( ( 'Expected <%s> to case-insensitive contain item <%s>, but did not.' % ( self . val , items [ 0 ] ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for i in items : #NEWLINE# #INDENT# if ( not isinstance ( i , str_types ) ) : #NEWLINE# #INDENT# raise TypeError ( 'given args must all be strings' ) #NEWLINE# #UNINDENT# if ( i . lower ( ) not in self . val . lower ( ) ) : #NEWLINE# #INDENT# self . _err ( ( 'Expected <%s> to case-insensitive contain items %s, but did not contain <%s>.' % ( self . val , items , i ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return self