예제 #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)