8.2.34 | Linux | www-data (uid:33)
👁 View: testcase.py
📁 //snap/core24/2124/lib/python3.12/test/support/testcase.py
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)
← Back
💻 Terminal
📤 Upload
📂
Click or Drag & Drop
📁 //snap/core24/2124/lib/python3.12/test/support
NameSizePermModifiedActions
📁 __pycache__/-07552026-08-24 03:28🗑 Delete
📁 _hypothesis_stubs/-07552026-08-24 03:28🗑 Delete
__init__.py79.3K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
ast_helper.py1.8K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
asynchat.py11.3K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
asyncore.py19.9K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
bytecode_helper.py4.9K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
hashlib_helper.py1.9K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
hypothesis_helper.py1.4K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
import_helper.py10.5K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
interpreters.py5.7K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
logging_helper.py916B06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
os_helper.py23.7K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
pty_helper.py3K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
script_helper.py11.4K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
smtpd.py30K07552026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
socket_helper.py13.5K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
testcase.py1K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
threading_helper.py7.9K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del
warnings_helper.py6.7K06442026-06-19 12:46👁 View ✏️ Edit 📝 Rename 📦 Move 🗑 Del