From cebe57a60923c89123389bc5c0fb57afe77f299c Mon Sep 17 00:00:00 2001 From: Hanif Ariffin Date: Mon, 31 Mar 2025 00:11:53 +0800 Subject: [PATCH] Updated test_baseexception from 3.12.2 Signed-off-by: Hanif Ariffin --- Lib/test/test_baseexception.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_baseexception.py b/Lib/test/test_baseexception.py index a73711c416..e19162a6ab 100644 --- a/Lib/test/test_baseexception.py +++ b/Lib/test/test_baseexception.py @@ -79,9 +79,10 @@ def test_inheritance(self): finally: inheritance_tree.close() + # Underscore-prefixed (private) exceptions don't need to be documented + exc_set = set(e for e in exc_set if not e.startswith('_')) # RUSTPYTHON specific exc_set.discard("JitError") - self.assertEqual(len(exc_set), 0, "%s not accounted for" % exc_set) interface_tests = ("length", "args", "str", "repr") @@ -135,7 +136,7 @@ class Value(str): d[HashThisKeyWillClearTheDict()] = Value() # refcount of Value() is 1 now - # Exception.__setstate__ should aquire a strong reference of key and + # Exception.__setstate__ should acquire a strong reference of key and # value in the dict. Otherwise, Value()'s refcount would go below # zero in the tp_hash call in PyObject_SetAttr(), and it would cause # crash in GC.