BUG: fix broken tests for versioned_branches feature#533
Merged
asottile merged 1 commit intoasottile:masterfrom Sep 13, 2021
Merged
BUG: fix broken tests for versioned_branches feature#533asottile merged 1 commit intoasottile:masterfrom
asottile merged 1 commit intoasottile:masterfrom
Conversation
c213c31 to
59ba7b8
Compare
Contributor
Author
asottile
reviewed
Sep 13, 2021
| yield ast_to_offset(node), _fix_py3_block | ||
| else: | ||
| # don't try to fix, e.g., >= (3, 6) if there's no else clause | ||
| yield ast_to_offset(node), lambda i, tokens: None |
Owner
There was a problem hiding this comment.
we shouldn't put noop callbacks into the callback machinery -- I think the original logic was fine here (?)
Contributor
Author
There was a problem hiding this comment.
actually the result with the original logic for that one broken test is
import sys
if True:
- if sys.version_info >= (3, 6):
- pass
+ passso that sounds about right to me, I guess this test was misplaced and shouldn't have been in the "noop" zone at all ?
I'll push to revert this.
| 'import sys' | ||
| 'if True' | ||
| 'import sys\n' | ||
| 'if True\n' |
asottile
reviewed
Sep 13, 2021
| 'if sys.version_info >= (3, 6):\n' | ||
| ' pass' | ||
| ) | ||
| expected = 'import sys\n' |
Owner
There was a problem hiding this comment.
I expect import sys\npass\n -- and my checkout of pyupgrade correctly makes that happen (?)
Contributor
Author
There was a problem hiding this comment.
you're right, sorry, it's getting late in 🇫🇷
c3d71b9 to
1e9a2fd
Compare
Contributor
Author
|
wait don't merge I can add an id to the test |
1e9a2fd to
9adb0c6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Followup to #530, thanks to a comment from @graingert
Actually the bug now fails, revealing a bug in #530 ? I'll try to fix this promptly