mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Update test_exceptions from 3.13.5
This commit is contained in:
1 parent
e064f8cef2
commit
0fbe6ce268
2 files changed
+513
-633
No files matched your search
Vendored
+19
@@ -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):
|
||||
|
||||
Vendored
+494
-633
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user