diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2010-12-05 07:17:25 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2010-12-05 07:17:25 (GMT) |
commit | 7bd5dbe9a03755b3221a29523a62b50c02c167b2 (patch) | |
tree | e974fa3d3208ab4df322bb18708817ea25ba65f9 /Lib/test/regrtest.py | |
parent | 413abbc2772b64803991a78438770479b3cf529c (diff) | |
download | cpython-7bd5dbe9a03755b3221a29523a62b50c02c167b2.zip cpython-7bd5dbe9a03755b3221a29523a62b50c02c167b2.tar.gz cpython-7bd5dbe9a03755b3221a29523a62b50c02c167b2.tar.bz2 |
More fine-grained monitoring of alterations to logging state
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index e16594f..4aa12b6 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -815,7 +815,8 @@ class saved_test_environment: resources = ('sys.argv', 'cwd', 'sys.stdin', 'sys.stdout', 'sys.stderr', 'os.environ', 'sys.path', 'sys.path_hooks', '__import__', - 'warnings.filters', 'asyncore.socket_map', 'logging._handlers') + 'warnings.filters', 'asyncore.socket_map', + 'logging._handlers', 'logging._handlerList') def get_sys_argv(self): return id(sys.argv), sys.argv, sys.argv[:] @@ -885,13 +886,18 @@ class saved_test_environment: def get_logging__handlers(self): # _handlers is a WeakValueDictionary - # _handlerList is a list of weakrefs to handlers - return (id(logging._handlers), logging._handlers, logging._handlers.copy(), - id(logging._handlerList), logging._handlerList, logging._handlerList[:]) + return id(logging._handlers), logging._handlers, logging._handlers.copy() def restore_logging__handlers(self, saved_handlers): # Can't easily revert the logging state pass + def get_logging__handlerList(self): + # _handlerList is a list of weakrefs to handlers + return id(logging._handlerList), logging._handlerList, logging._handlerList[:] + def restore_logging__handlerList(self, saved_handlerList): + # Can't easily revert the logging state + pass + def resource_info(self): for name in self.resources: method_suffix = name.replace('.', '_') |