File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def test_get_logger_reuse(self):
9696 logger = stackify .getLogger (config = self .config , auto_shutdown = False )
9797 self .loggers .append (logger )
9898 logger_two = stackify .getLogger (config = self .config , auto_shutdown = False )
99- self .assertEqual ( id ( logger_two ), id ( logger ) )
99+ self .assertIs ( logger_two , logger )
100100
101101 def test_logger_atexit (self ):
102102 '''Logger registers an atexit function to clean up'''
@@ -106,6 +106,12 @@ def test_logger_atexit(self):
106106 self .loggers .append (logger )
107107 func .assert_called_with (stackify .stopLogging , logger )
108108
109+ def test_get_handlers (self ):
110+ '''Registered handlers are provided by getHandlers'''
111+ logger = stackify .getLogger (config = self .config , auto_shutdown = False )
112+ self .loggers .append (logger )
113+ self .assertEqual (logger .handlers , stackify .getHandlers (logger ))
114+
109115
110116if __name__ == '__main__' :
111117 unittest .main ()
You can’t perform that action at this time.
0 commit comments