Skip to content
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

add support for WITH_CLEANUP_START,WITH_CLEANUP_FINISH #460

Conversation

TiZCrocodile
Copy link
Contributor

  • WITH_CLEANUP_START is like WITH_CLEANUP.

  • WITH_CLEANUP_FINISH we can ignore.

  • The tests results in fail because of a try except else inside a with statement, but anyway as you can see this error exists in 3.4 also (before WITH_CLEANUP_START), so it doesn't related to the handle of the with statement, only the try-except-else.

*** test_with: FAIL (2 of 2) + XFAIL (1)
        test_with.3.4.pyc
tests/test_with.3.4.pyc.tok.txt does not match /mnt/c/Users/MrDakik/Downloads/pycdc_contrib/tests/tokenized/test_with.txt:
--- /mnt/c/Users/MrDakik/Downloads/pycdc_contrib/tests/tokenized/test_with.txt  2024-02-26 16:32:22.448784400 +0200
+++ tests/test_with.3.4.pyc.tok.txt     2024-02-27 10:50:02.996121800 +0200
@@ -46,6 +46,4 @@
 <INDENT>
 result = 'exception' <EOL>
 <OUTDENT>
-else : <EOL>
-<INDENT>
 result += '
' <EOL>

        test_with.3.5.pyc
tests/test_with.3.5.pyc.tok.txt does not match /mnt/c/Users/MrDakik/Downloads/pycdc_contrib/tests/tokenized/test_with.txt:
--- /mnt/c/Users/MrDakik/Downloads/pycdc_contrib/tests/tokenized/test_with.txt  2024-02-26 16:32:22.448784400 +0200
+++ tests/test_with.3.5.pyc.tok.txt     2024-02-27 10:50:03.221916200 +0200
@@ -46,6 +46,4 @@
 <INDENT>
 result = 'exception' <EOL>
 <OUTDENT>
-else : <EOL>
-<INDENT>
 result += '
' <EOL>

I also checked and source of:

try:
    print('try')
except:
    print('except')
else:
    print('else')

results in:

try:
    print('try')
except:
    print('except')

print('else')

so we need to fix this anyways :) .

@zrax
Copy link
Owner

zrax commented Feb 27, 2024

You can move the compiled tests to tests/xfail/ if their output is known to be incorrect for now

@zrax zrax merged commit bb342a9 into zrax:master Feb 27, 2024
5 checks passed
@TiZCrocodile TiZCrocodile deleted the support-for-`WITH_CLEANUP_START`,`WITH_CLEANUP_FINISH` branch April 9, 2024 18:09
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.

2 participants