Update test_exceptions from 3.13.5

This commit is contained in:
ShaharNaveh committed 2025-07-16 13:37:18 +03:00
1 parent e064f8cef2
commit 0fbe6ce268
2 files changed
+513 -633

No files matched your search

+19
View File
@@ -2617,6 +2617,10 @@ skip_on_s390x = unittest.skipIf(hasattr(os, 'uname') and os.uname().machine == '
'skipped on s390x')
HAVE_ASAN_FORK_BUG = check_sanitizer(address=True)
# From CPython 3.13.5
Py_TRACE_REFS = hasattr(sys, 'getobjects')
# From Cpython 3.13.5
@contextlib.contextmanager
def no_color():
@@ -2641,6 +2645,21 @@ def force_not_colorized(func):
return wrapper
# From Cpython 3.13.5
def force_not_colorized_test_class(cls):
"""Force the terminal not to be colorized for the entire test class."""
original_setUpClass = cls.setUpClass
@classmethod
@functools.wraps(cls.setUpClass)
def new_setUpClass(cls):
cls.enterClassContext(no_color())
original_setUpClass()
cls.setUpClass = new_setUpClass
return cls
# From python 3.12.8
class BrokenIter:
def __init__(self, init_raises=False, next_raises=False, iter_raises=False):
+494 -633
View File
File diff suppressed because it is too large. Load diff