#NEWLINE# def test_compile_regex( self ) : #NEWLINE# #INDENT# metric_query_pat = 'metric_prefix.*' #NEWLINE# expected = '^metric_prefix\\.[^\\.]*$' #NEWLINE# rec = self . finder . compile_regex ( '^{0}$' , Query ( metric_query_pat ) ) #NEWLINE# self . assertEqual ( rec . pattern , expected , msg = ( 'Got unexpected compiled regex pattern %s from graphite metric query %s. Expected compiled pattern %s' % ( rec . pattern , metric_query_pat , expected ) ) )