Skip to content

Commit

Permalink
Merge pull request #834 from asottile/16806
Browse files Browse the repository at this point in the history
remove test workaround for 3.7-era bug
  • Loading branch information
asottile committed Jun 10, 2023
2 parents 72bafb1 + a2c9cb1 commit ccc391b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/features/percent_format_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from __future__ import annotations

import ast

import pytest

from pyupgrade._data import Settings
Expand Down Expand Up @@ -186,19 +184,6 @@ def test_percent_format_noop(s):
assert _fix_plugins(s, settings=Settings()) == s


def _has_16806_bug():
# See https://bugs.python.org/issue16806
body = ast.parse('"""\n"""').body[0]
assert isinstance(body, ast.Expr)
return body.value.col_offset == -1


@pytest.mark.xfail(not _has_16806_bug(), reason='multiline string parse bug')
def test_percent_format_noop_if_bug_16806():
s = '"""%s\n""" % ("issue16806",)'
assert _fix_plugins(s, settings=Settings()) == s


@pytest.mark.parametrize(
('s', 'expected'),
(
Expand Down

0 comments on commit ccc391b

Please sign in to comment.