#NEWLINE# def test_get_logger( self ) : #NEWLINE# #INDENT# self . assertEqual ( test_log . name , test_log_name ) #NEWLINE# self . assertEqual ( log . getLogger ( ) , logging . root ) #NEWLINE# self . assertEqual ( len ( log . getLogger ( log_path = 'root.log' ) . handlers ) , 2 ) #NEWLINE# self . assertEqual ( len ( log . getLogger ( log_path = 'root2.log' ) . handlers ) , 2 ) #NEWLINE# self . assertEqual ( len ( log . getLogger ( level = logging . WARNING , log_path = 'root3.log' ) . handlers ) , 3 ) #NEWLINE# logger_one = log . getLogger ( 'logger.one' ) #NEWLINE# self . assertEqual ( logger_one . name , 'logger.one' ) #NEWLINE# self . assertEqual ( len ( logger_one . handlers ) , 0 ) #NEWLINE# logger_two = log . getLogger ( 'logger.two' , logging . DEBUG , 'logger_test.log' ) #NEWLINE# self . assertEqual ( logger_two . level , logging . DEBUG ) #NEWLINE# self . assertEqual ( len ( logger_two . handlers ) , 1 ) #NEWLINE# logger_two_2 = log . getLogger ( 'logger.two' , logging . DEBUG , 'logger_test2.log' ) #NEWLINE# self . assertEqual ( logger_two_2 . level , logging . DEBUG ) #NEWLINE# self . assertEqual ( len ( logger_one . handlers ) , 1 ) #NEWLINE# logger_two_3 = log . getLogger ( 'logger.two' , logging . ERROR , 'logger_test3.log' ) #NEWLINE# self . assertEqual ( logger_two_3 . level , logging . ERROR ) #NEWLINE# self . assertEqual ( len ( logger_two . handlers ) , 2 )