Exemple #1
0
def test_fix_yield_from_noop(s):
    assert _fix_py3_plus(s) == s
Exemple #2
0
def test_fix_py2_blocks(s, expected):
    assert _fix_py3_plus(s, (3,)) == expected
Exemple #3
0
def test_fix_yield_from(s, expected):
    assert _fix_py3_plus(s, (3, )) == expected
Exemple #4
0
def test_fix_async_yield_from(s, expected):
    assert _fix_py3_plus(s) == expected
Exemple #5
0
def test_fix_py2_block_noop(s):
    assert _fix_py3_plus(s, (3,)) == s
Exemple #6
0
def test_fix_py3_only_code(s, expected):
    assert _fix_py3_plus(s, (3,)) == expected
Exemple #7
0
def test_fix_oserror_aliases_try(alias, tpl, expected):
    s = tpl.format(alias=alias)
    assert _fix_py3_plus(s) == expected
Exemple #8
0
def test_fix_oserror_aliases_noop(imp, tpl):
    s = tpl.format(imp=imp)
    assert _fix_py3_plus(s) == s
Exemple #9
0
def test_fix_oserror_complex_aliases_raise(imp, tpl, expected_tpl):
    s, expected = tpl.format(imp=imp), expected_tpl.format(imp=imp)
    assert _fix_py3_plus(s) == expected