def test_fix_yield_from_noop(s): assert _fix_py3_plus(s) == s
def test_fix_py2_blocks(s, expected): assert _fix_py3_plus(s, (3,)) == expected
def test_fix_yield_from(s, expected): assert _fix_py3_plus(s, (3, )) == expected
def test_fix_async_yield_from(s, expected): assert _fix_py3_plus(s) == expected
def test_fix_py2_block_noop(s): assert _fix_py3_plus(s, (3,)) == s
def test_fix_py3_only_code(s, expected): assert _fix_py3_plus(s, (3,)) == expected
def test_fix_oserror_aliases_try(alias, tpl, expected): s = tpl.format(alias=alias) assert _fix_py3_plus(s) == expected
def test_fix_oserror_aliases_noop(imp, tpl): s = tpl.format(imp=imp) assert _fix_py3_plus(s) == s
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