MCPcopy Create free account
hub / github.com/RustPython/RustPython / get_line_branches

Method get_line_branches

Lib/test/test_code.py:1499–1509  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

1497 def test_co_branches(self):
1498
1499 def get_line_branches(func):
1500 code = func.__code__
1501 base = code.co_firstlineno
1502 return [
1503 (
1504 code_offset_to_line(code, src) - base,
1505 code_offset_to_line(code, left) - base,
1506 code_offset_to_line(code, right) - base
1507 ) for (src, left, right) in
1508 code.co_branches()
1509 ]
1510
1511 def simple(x):
1512 if x:

Callers

nothing calls this directly

Calls 1

co_branchesMethod · 0.80

Tested by

no test coverage detected