-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test ipython support #69
Conversation
8c2fdec
to
e31a732
Compare
hi @alexmojaki, I integrated the ipython tests. Maybe you can review it if you have time. |
executing/_position_node_finder.py
Outdated
and not isinstance(node,ast.Call) | ||
and any(isinstance(p, ast.Assert) for p in parents(node)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and not isinstance(node,ast.Call) | |
and any(isinstance(p, ast.Assert) for p in parents(node)) | |
and isinstance(node,ast.Assert) |
just confirming that this doesn't work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not work. The CALL of the generated assertion has the source range of the comparison.
1 assert self is None or frame, ()
all bytecodes in this range:
<module>:
offset start end instruction ast-node
0 0:0 1:0 RESUME(0) NoneType
2 1:7 1:11 LOAD_NAME(self) Name(self)
4 1:7 1:19 POP_JUMP_FORWARD_IF_NONE(30) VerifierFailure: ast.Compare is not created from POP_JUMP_FORWARD_IF_NONE
6 1:23 1:28 LOAD_NAME(frame) Name(frame)
8 1:7 1:19 POP_JUMP_FORWARD_IF_TRUE(34) VerifierFailure: ast.Compare is not created from POP_JUMP_FORWARD_IF_TRUE
10 1:7 1:19 LOAD_ASSERTION_ERROR(None) VerifierFailure: ast.Compare is not created from LOAD_ASSERTION_ERROR
12 1:30 1:32 LOAD_CONST(()) VerifierFailure: ast.Tuple is not created from LOAD_CONST
14 1:7 1:19 PRECALL(0) VerifierFailure: ast.Compare is not created from PRECALL
16 1:7 1:19 CACHE(None) VerifierFailure: ast.Compare is not created from PRECALL
18 1:7 1:19 CALL(0) VerifierFailure: ast.Compare is not created from CALL
20 1:7 1:19 CACHE(None) VerifierFailure: ast.Compare is not created from CALL
22 1:7 1:19 CACHE(None) VerifierFailure: ast.Compare is not created from CALL
24 1:7 1:19 CACHE(None) VerifierFailure: ast.Compare is not created from CALL
26 1:7 1:19 CACHE(None) VerifierFailure: ast.Compare is not created from CALL
28 1:7 1:19 RAISE_VARARGS(1) VerifierFailure: ast.Compare is not created from RAISE_VARARGS
30 1:7 1:19 LOAD_CONST(None) VerifierFailure: ast.Compare is not created from LOAD_CONST
32 1:7 1:19 RETURN_VALUE(None) VerifierFailure: ast.Compare is not created from RETURN_VALUE
34 1:7 1:19 LOAD_CONST(None) VerifierFailure: ast.Compare is not created from LOAD_CONST
36 1:7 1:19 RETURN_VALUE(None) VerifierFailure: ast.Compare is not created from RETURN_VALUE
tests/test_main.py
Outdated
@@ -729,6 +729,10 @@ def test_sample_files(self, full_filename, result_filename): | |||
assert result == json.load(infile) | |||
|
|||
|
|||
@pytest.mark.skipif( | |||
NodeFinder.__name__ == "SentinelNodeFinder", | |||
reason="The SentinelNodeFinder has problems in some situations (see skip_sentinel)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a huge amount of testing to skip for everything <3.11
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem appeared when I added the ipython and coverage dependencies.
Some files trigger the same issues which gets triggered by test_small_samples
.
This small_samples are already excluded for the SentinelNodeFinder (skip_sentinel
array).
I don't know how easy it is to fix this issues in the SentinelNodeFinder.
I don't want to put to much time into this, because I don't have to much and because #64 can maybe replace the SentinelNodeFinder for 3.8, 3.9 and 3.10 soon.
I also created https://github.com/15r10nk/pysource-codegen with the coal to use it to test executing. I'm pretty sure that I will find more issues in all of the 3 node finders. The question here is if it is possible to solve them all.
It will be some work, but based on my experience with Index/PositionNodefinder, I'm pretty sure they are solvable.
However I have no experience with the SentinelNodeFinder. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently working on the SentinelNodeFinder and try to fix some Issues to get a better understanding
Sorry for the silence, life has been overwhelming. Thanks for working on this. |
I know the problem when you don't have enough time for everything. Thank you for taking care of it. |
b388be4
to
ca7dae8
Compare
resolve #59
resolve #68