示例#1
0
文件: test_analysis.py 项目: yws/py14
def test_is_not_void_for_fun_with_return_value():
    source = parse(
        "def foo(x):",
        "   return x",
    )
    foo = source.body[0]
    assert not is_void_function(foo)
示例#2
0
文件: test_analysis.py 项目: yws/py14
def test_is_void_for_fun_with_no_return():
    source = parse(
        "def foo(x):",
        "   bar(x)",
    )
    foo = source.body[0]
    assert is_void_function(foo)