예제 #1
0
def test_fix_yield_from_noop(s):
    assert _fix_py3_plus(s) == s
예제 #2
0
def test_fix_py2_blocks(s, expected):
    assert _fix_py3_plus(s, (3,)) == expected
예제 #3
0
def test_fix_yield_from(s, expected):
    assert _fix_py3_plus(s, (3, )) == expected
예제 #4
0
def test_fix_async_yield_from(s, expected):
    assert _fix_py3_plus(s) == expected
예제 #5
0
def test_fix_py2_block_noop(s):
    assert _fix_py3_plus(s, (3,)) == s
예제 #6
0
def test_fix_py3_only_code(s, expected):
    assert _fix_py3_plus(s, (3,)) == expected
예제 #7
0
def test_fix_oserror_aliases_try(alias, tpl, expected):
    s = tpl.format(alias=alias)
    assert _fix_py3_plus(s) == expected
예제 #8
0
def test_fix_oserror_aliases_noop(imp, tpl):
    s = tpl.format(imp=imp)
    assert _fix_py3_plus(s) == s
예제 #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