Esempio n. 1
0
def test_fix_fstrings_noop(s):
    assert _fix_py36_plus(s) == s
Esempio n. 2
0
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
Esempio n. 9
0
def test_typing_typed_dict_noop(s):
    assert _fix_py36_plus(s, min_version=(3, 6)) == s
Esempio n. 10
0
def test_typing_typed_dict(s, expected):
    assert _fix_py36_plus(s, min_version=(3, 6)) == expected
Esempio n. 11
0
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
Esempio n. 12
0
def test_fix_fstrings(s, expected):
    assert _fix_py36_plus(s, min_version=(3, 6)) == expected
Esempio n. 13
0
def test_fix_fstrings_noop(s):
    assert _fix_py36_plus(s, min_version=(3, 6)) == s