File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323
2424
2525class TestLogging :
26- @pytest .fixture (scope = "function" )
26+ @pytest .fixture (scope = "function" , autouse = True )
2727 def teardown_logger (self ):
28- """Ensure the logger is deleted at the end of each test."""
28+ """Ensure the logger is deleted at the start and after the test."""
29+ ds_logger .close_log_filehandler ()
30+ if "datashuttle" in logging .root .manager .loggerDict :
31+ logging .root .manager .loggerDict .pop ("datashuttle" , None )
32+
2933 yield
34+
35+ ds_logger .close_log_filehandler ()
3036 if "datashuttle" in logging .root .manager .loggerDict :
31- logging .root .manager .loggerDict .pop ("datashuttle" )
37+ logging .root .manager .loggerDict .pop ("datashuttle" , None )
3238
3339 # -------------------------------------------------------------------------
3440 # Basic Functionality Tests
You can’t perform that action at this time.
0 commit comments