Conversation
8c2fdec to
e31a732
Compare
|
hi @alexmojaki, I integrated the ipython tests. Maybe you can review it if you have time. |
| and not isinstance(node,ast.Call) | ||
| and any(isinstance(p, ast.Assert) for p in parents(node)) |
There was a problem hiding this comment.
| 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.
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
|
|
||
| @pytest.mark.skipif( | ||
| NodeFinder.__name__ == "SentinelNodeFinder", | ||
| reason="The SentinelNodeFinder has problems in some situations (see skip_sentinel)", |
There was a problem hiding this comment.
This is a huge amount of testing to skip for everything <3.11
There was a problem hiding this comment.
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.
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