def test_fix_fstrings_noop(s): assert _fix_py36_plus(s) == s
def test_fix_fstrings(s, expected): assert _fix_py36_plus(s) == expected
def test_fix_typing_named_tuple(s, expected): assert _fix_py36_plus(s) == expected
def test_typing_named_tuple_noop(s): assert _fix_py36_plus(s) == s
def test_typing_typed_dict(s, expected): assert _fix_py36_plus(s) == expected
def test_typing_typed_dict_noop(s): assert _fix_py36_plus(s) == s
def test_fix_typing_named_tuple(s, expected): assert _fix_py36_plus(s, min_version=(3, 6)) == expected
def test_typing_named_tuple_noop(s): assert _fix_py36_plus(s, min_version=(3, 6)) == s
def test_typing_typed_dict_noop(s): assert _fix_py36_plus(s, min_version=(3, 6)) == s
def test_typing_typed_dict(s, expected): assert _fix_py36_plus(s, min_version=(3, 6)) == expected
def test_fix_fstrings_await_py37(): s = "async def c(): return '{}'.format(await 1+foo())" expected = "async def c(): return f'{await 1+foo()}'" assert _fix_py36_plus(s, min_version=(3, 7)) == expected
def test_fix_fstrings(s, expected): assert _fix_py36_plus(s, min_version=(3, 6)) == expected
def test_fix_fstrings_noop(s): assert _fix_py36_plus(s, min_version=(3, 6)) == s