-
Notifications
You must be signed in to change notification settings - Fork 10
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 test case for changed lined numbers in use-walrus-if #336
Conversation
Bumped the unit test timeout since we keep hitting on this for the Python 3.12 tests. See #338. |
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 not sure what is the problem here. The current behavior seems to be correct as it reports the node positions of the if
s in the original code.
tests/codemods/test_walrus_if.py
Outdated
@@ -181,3 +181,35 @@ def func(y): | |||
print("whatever", y) | |||
""" | |||
self.run_and_assert(tmpdir, input_code, expected_output) | |||
|
|||
@pytest.mark.xfail(reason="Need to recompute line numbers to reflect removed lines") | |||
def test_multiple_warlus_changes(self, tmpdir): |
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.
warlus -> walrus
@andrecsilva the line locations here affect the position of the comments in CodeTF. In general we frame our comments in terms of the fix rather than the problem and we want the comments to appear on the right side of the split diff, which means they need to be associated with new code positions. |
7f2ae59
to
d6ac755
Compare
Quality Gate passedIssues Measures |
Overview
Add (failing) test case for computed line numbers in
use-walrus-if
Details