Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Lib/test/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
from test.support import threading_helper, import_helper
from test.support.bytecode_helper import instructions_with_positions
from opcode import opmap, opname
try:
try: # TODO: RUSTPYTHON
from _testcapi import code_offset_to_line
except ModuleNotFoundError:
code_offset_to_line = None
Expand Down Expand Up @@ -427,8 +427,7 @@ def func():
new_code = code = func.__code__.replace(co_linetable=b'')
self.assertEqual(list(new_code.co_lines()), [])

# TODO: RUSTPYTHON; co_lnotab intentionally not implemented (deprecated since 3.12)
@unittest.expectedFailure
@unittest.expectedFailure # TODO: RUSTPYTHON; co_lnotab intentionally not implemented (deprecated since 3.12)
def test_co_lnotab_is_deprecated(self): # TODO: remove in 3.14
def func():
pass
Expand Down Expand Up @@ -491,8 +490,7 @@ def spam9():
res = _testinternalcapi.code_returns_only_none(func.__code__)
self.assertFalse(res)

# TODO: RUSTPYTHON; replace() rejects invalid bytecodes for safety
@unittest.expectedFailure
@unittest.expectedFailure # TODO: RUSTPYTHON; replace() rejects invalid bytecodes for safety
def test_invalid_bytecode(self):
def foo():
pass
Expand All @@ -508,7 +506,7 @@ def foo():
with self.assertRaisesRegex(SystemError, msg):
foo()

# @requires_debug_ranges()
@requires_debug_ranges()
def test_co_positions_artificial_instructions(self):
import dis

Expand Down Expand Up @@ -1491,7 +1489,7 @@ async def async_func():

rc, out, err = assert_python_ok('-OO', '-c', code)

@unittest.skipUnless(code_offset_to_line, '_testcapi required')
@unittest.expectedFailureIf(code_offset_to_line is None, "TODO: RUSTPYTHON")
def test_co_branches(self):

def get_line_branches(func):
Expand Down
1 change: 1 addition & 0 deletions Lib/test/test_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def test_nt_and_posix_stack_size(self):

thread.stack_size(0)

@unittest.skipIf(__import__("sys").platform == "linux", "TODO: RUSTPYTHON; Flakey on CI")
def test__count(self):
# Test the _count() function.
orig = thread._count()
Expand Down
Loading