Skip to content

Extract node_linenos to account for end_lineno and use in assert_linenos#41

Merged
alexmojaki merged 1 commit intomasterfrom
node_linenos
Jul 26, 2022
Merged

Extract node_linenos to account for end_lineno and use in assert_linenos#41
alexmojaki merged 1 commit intomasterfrom
node_linenos

Conversation

@alexmojaki
Copy link
Copy Markdown
Owner

Fixes #40

It looks like this was specifically about pytest magic conflicting with executing, not a general problem.

More technically: Some instructions coming from pytest AST magic were not being ignored because their lineno didn't match the lineno of an assert statement. By using the end_lineno of multiline expressions, more line numbers are recognised as belonging to assert statements and ignored in the presence of pytest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

executing failed to find the calling node on 3.10

1 participant