Skip to content

Commit cebe57a

Browse files
committed
Updated test_baseexception from 3.12.2
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
1 parent d7113e1 commit cebe57a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Lib/test/test_baseexception.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@ def test_inheritance(self):
7979
finally:
8080
inheritance_tree.close()
8181

82+
# Underscore-prefixed (private) exceptions don't need to be documented
83+
exc_set = set(e for e in exc_set if not e.startswith('_'))
8284
# RUSTPYTHON specific
8385
exc_set.discard("JitError")
84-
8586
self.assertEqual(len(exc_set), 0, "%s not accounted for" % exc_set)
8687

8788
interface_tests = ("length", "args", "str", "repr")
@@ -135,7 +136,7 @@ class Value(str):
135136

136137
d[HashThisKeyWillClearTheDict()] = Value() # refcount of Value() is 1 now
137138

138-
# Exception.__setstate__ should aquire a strong reference of key and
139+
# Exception.__setstate__ should acquire a strong reference of key and
139140
# value in the dict. Otherwise, Value()'s refcount would go below
140141
# zero in the tp_hash call in PyObject_SetAttr(), and it would cause
141142
# crash in GC.

0 commit comments

Comments
 (0)