MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_co_positions_empty_linetable

Method test_co_positions_empty_linetable

Lib/test/test_code.py:593–600  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

591
592 @requires_debug_ranges()
593 def test_co_positions_empty_linetable(self):
594 def func():
595 x = 1
596 new_code = func.__code__.replace(co_linetable=b'')
597 positions = new_code.co_positions()
598 for line, end_line, column, end_column in positions:
599 self.assertIsNone(line)
600 self.assertEqual(end_line, new_code.co_firstlineno + 1)
601
602 def test_code_equality(self):
603 def f():

Callers

nothing calls this directly

Calls 4

co_positionsMethod · 0.80
assertIsNoneMethod · 0.80
replaceMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected