mark more tests

This commit is contained in:
ShaharNaveh committed 2025-07-16 13:37:18 +03:00
1 parent 9e22580a95
commit 4515c614bf
2 files changed
+22 -4

No files matched your search

+20 -4
View File
@@ -840,11 +840,27 @@ def python_is_optimized():
return final_opt not in ('', '-O0', '-Og')
_header = 'nP'
# From CPython 3.13.5
Py_GIL_DISABLED = bool(sysconfig.get_config_var('Py_GIL_DISABLED'))
# From CPython 3.13.5
def requires_gil_enabled(msg="needs the GIL enabled"):
"""Decorator for skipping tests on the free-threaded build."""
return unittest.skipIf(Py_GIL_DISABLED, msg)
# From CPython 3.13.5
def expected_failure_if_gil_disabled():
"""Expect test failure if the GIL is disabled."""
if Py_GIL_DISABLED:
return unittest.expectedFailure
return lambda test_case: test_case
# From CPython 3.13.5
if Py_GIL_DISABLED:
_header = 'PHBBInP'
else:
_header = 'nP'
_align = '0n'
if hasattr(sys, "getobjects"):
_header = '2P' + _header
_align = '0P'
_vheader = _header + 'n'
def calcobjsize(fmt):
+2
View File
@@ -430,6 +430,8 @@ class TracebackCases(unittest.TestCase):
self.assertEqual(len(err), 1)
self.assertEqual(err[-1], 'SyntaxError: error\n')
# TODO: RUSTPYTHON; IndexError: index out of range
@unittest.expectedFailure
@requires_subprocess()
@force_not_colorized
def test_encoded_file(self):