Skip to content

Commit

Permalink
Merge pull request #533 from neutrinoceros/fixup_versioned_branches_t…
Browse files Browse the repository at this point in the history
…ests

BUG: fix broken tests for versioned_branches feature
  • Loading branch information
asottile committed Sep 13, 2021
2 parents 486760a + 9adb0c6 commit cb501c4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/features/versioned_branches_test.py
Expand Up @@ -545,6 +545,15 @@ def test_fix_py3_only_code(s, expected):
'3+6\n',
id='from sys import version_info, <= (3, 5)',
),
pytest.param(
'import sys\n'
'if sys.version_info >= (3, 6):\n'
' pass',
'import sys\n'
'pass',
id='sys.version_info >= (3, 6), noelse',
),
),
)
def test_fix_py3x_only_code(s, expected):
Expand All @@ -555,15 +564,6 @@ def test_fix_py3x_only_code(s, expected):
@pytest.mark.parametrize(
's',
(
# we timidly skip `if` without `else` as it could cause a SyntaxError
'import sys'
'if sys.version_info >= (3, 6):\n'
' pass',
# here's the case where it causes a SyntaxError
'import sys'
'if True'
' if sys.version_info >= (3, 6):\n'
' pass\n',
# both branches are still relevant in the following cases
'import sys\n'
'if sys.version_info > (3, 7):\n'
Expand Down

0 comments on commit cb501c4

Please sign in to comment.