-
Notifications
You must be signed in to change notification settings - Fork 290
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
Acid tests should check bytecode too #52
Comments
I explored bytecode comparison when I first wrote the acid tests. I gave up on it once I found that things like By the way, the idiomatic changes I mention are basically the things |
See 8631ecb. |
I should probably do a recursive comparison of the code object rather than using |
Previously we were only disassembling the top-level code. Now we recursively disassemble the lower levels. This resolves issue #52.
For the most part, this works well. But sometimes the same code section generates different, but equivalent, bytecode representations. For example
versus
|
Comparing the AST works better. |
The tests should verify that the pep8ized file generates the same bytecode as the original file.
There should be some sort of smart comparison because line numbers should not be compared.
I think is very important to verify that this tool doesn't actually change the code.
"Correct some non-idiomatic Python code." is mentioned in the readme but no details on what corrections are made ? This should be disabled for the bytecode match tests if it does code reductions or optimizations.
The text was updated successfully, but these errors were encountered: