#NEWLINE# def testPkbLogFilter( self ) : #NEWLINE# #INDENT# 'Verify that PkbLogFilter sets the pkb_label of LogRecords it processes.\n    ' #NEWLINE# logger_name = 'log_util_test.LogUtilTestCase.testPkbLogFilter' #NEWLINE# context = log_util . ThreadLogContext ( ) #NEWLINE# log_util . SetThreadLogContext ( context ) #NEWLINE# with context . ExtendLabel ( 'LABEL-A' ) : #NEWLINE# #INDENT# log_record = logging . LogRecord ( name = logger_name , level = logging . INFO , pathname = __file__ , lineno = ( inspect . getframeinfo ( inspect . currentframe ( ) ) . lineno + 1 ) , msg = 'Log message.' , args = None , exc_info = None ) #NEWLINE# log_util . PkbLogFilter ( ) . filter ( log_record ) #NEWLINE# self . assertEqual ( logger_name . pkb_label , 'LABEL-A ' )