Skip to content
Merged
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
3 changes: 2 additions & 1 deletion Lib/test/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@
from test.support import threading_helper, import_helper
from test.support.bytecode_helper import instructions_with_positions
from opcode import opmap, opname
from _testcapi import code_offset_to_line
try:
import _testinternalcapi
except ModuleNotFoundError:
Expand Down Expand Up @@ -1491,6 +1490,8 @@ async def async_func():
rc, out, err = assert_python_ok('-OO', '-c', code)

def test_co_branches(self):
_testcapi = import_helper.import_module("_testcapi")
code_offset_to_line = _testcapi.code_offset_to_line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can make it to a single line if that's preferred, I think it looks better this way but I don't feel strongly about it


def get_line_branches(func):
code = func.__code__
Expand Down
Loading