215215from test .support import threading_helper , import_helper
216216from test .support .bytecode_helper import instructions_with_positions
217217from opcode import opmap , opname
218- try :
218+ try : # TODO: RUSTPYTHON
219219 from _testcapi import code_offset_to_line
220220except ModuleNotFoundError :
221221 code_offset_to_line = None
@@ -427,8 +427,7 @@ def func():
427427 new_code = code = func .__code__ .replace (co_linetable = b'' )
428428 self .assertEqual (list (new_code .co_lines ()), [])
429429
430- # TODO: RUSTPYTHON; co_lnotab intentionally not implemented (deprecated since 3.12)
431- @unittest .expectedFailure
430+ @unittest .expectedFailure # TODO: RUSTPYTHON; co_lnotab intentionally not implemented (deprecated since 3.12)
432431 def test_co_lnotab_is_deprecated (self ): # TODO: remove in 3.14
433432 def func ():
434433 pass
@@ -491,8 +490,7 @@ def spam9():
491490 res = _testinternalcapi .code_returns_only_none (func .__code__ )
492491 self .assertFalse (res )
493492
494- # TODO: RUSTPYTHON; replace() rejects invalid bytecodes for safety
495- @unittest .expectedFailure
493+ @unittest .expectedFailure # TODO: RUSTPYTHON; replace() rejects invalid bytecodes for safety
496494 def test_invalid_bytecode (self ):
497495 def foo ():
498496 pass
@@ -508,7 +506,7 @@ def foo():
508506 with self .assertRaisesRegex (SystemError , msg ):
509507 foo ()
510508
511- # @requires_debug_ranges()
509+ @requires_debug_ranges ()
512510 def test_co_positions_artificial_instructions (self ):
513511 import dis
514512
@@ -1491,7 +1489,7 @@ async def async_func():
14911489
14921490 rc , out , err = assert_python_ok ('-OO' , '-c' , code )
14931491
1494- @unittest .skipUnless (code_offset_to_line , '_testcapi required' )
1492+ @unittest .expectedFailureIf (code_offset_to_line is None , "TODO: RUSTPYTHON" )
14951493 def test_co_branches (self ):
14961494
14971495 def get_line_branches (func ):
0 commit comments