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

BUG: fix broken tests for versioned_branches feature #533

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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