#NEWLINE# @ pytest . fixture #NEWLINE# def validate_hash( self , hashfunc ) : #NEWLINE# #INDENT# hash_regexp = re . compile ( '^[0-9a-f]{{{}}}$' . format ( ( hashfunc ( ) . digest_size * 2 ) ) ) #NEWLINE# return hashfunc . match