/snap/core24/1587/usr/lib/python3.12/test/support
NameSizeModeActions
_hypothesis_stubs/-0755rm
__pycache__/-0755rm
ast_helper.py18280644editdlrm
asynchat.py116020644editdlrm
asyncore.py203810644editdlrm
bytecode_helper.py49990644editdlrm
hashlib_helper.py19070644editdlrm
hypothesis_helper.py13830644editdlrm
import_helper.py107350644editdlrm
interpreters.py58080644editdlrm
logging_helper.py9160644editdlrm
os_helper.py242860644editdlrm
pty_helper.py30520644editdlrm
script_helper.py117210644editdlrm
smtpd.py307320755editdlrm
socket_helper.py137940644editdlrm
testcase.py10470644editdlrm
threading_helper.py80490644editdlrm
warnings_helper.py68530644editdlrm
__init__.py802520644editdlrm
Edit: /snap/core24/1587/usr/lib/python3.12/test/support/logging_helper.py (916B)
import logging.handlers class TestHandler(logging.handlers.BufferingHandler): def __init__(self, matcher): # BufferingHandler takes a "capacity" argument # so as to know when to flush. As we're overriding # shouldFlush anyway, we can set a capacity of zero. # You can call flush() manually to clear out the # buffer. logging.handlers.BufferingHandler.__init__(self, 0) self.matcher = matcher def shouldFlush(self): return False def emit(self, record): self.format(record) self.buffer.append(record.__dict__) def matches(self, **kwargs): """ Look for a saved dict whose keys/values match the supplied arguments. """ result = False for d in self.buffer: if self.matcher.matches(d, **kwargs): result = True break return result