/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/testcase.py (1047B)
class ExceptionIsLikeMixin: def assertExceptionIsLike(self, exc, template): """ Passes when the provided `exc` matches the structure of `template`. Individual exceptions don't have to be the same objects or even pass an equality test: they only need to be the same type and contain equal `exc_obj.args`. """ if exc is None and template is None: return if template is None: self.fail(f"unexpected exception: {exc}") if exc is None: self.fail(f"expected an exception like {template!r}, got None") if not isinstance(exc, ExceptionGroup): self.assertEqual(exc.__class__, template.__class__) self.assertEqual(exc.args[0], template.args[0]) else: self.assertEqual(exc.message, template.message) self.assertEqual(len(exc.exceptions), len(template.exceptions)) for e, t in zip(exc.exceptions, template.exceptions): self.assertExceptionIsLike(e, t)