Exemplo n.º 1
0
def test_funcname():
    def f():
        pass

    assert funcname(f) == "f"
    assert funcname(partial(f)) == "f"
    assert funcname(partial(partial(f))) == "f"
Exemplo n.º 2
0
def test_funcname():
    def f():
        pass

    assert funcname(f) == 'f'
    assert funcname(partial(f)) == 'f'
    assert funcname(partial(partial(f))) == 'f'
Exemplo n.º 3
0
def _funcname(x):
    try:
        if isinstance(x, BatchedCalls):
            x = x.items[0][0]
    except Exception:
        pass
    return funcname(x)
Exemplo n.º 4
0
def _funcname(x):
    try:
        if isinstance(x, BatchedCalls):
            x = x.items[0][0]
    except Exception:
        pass
    return funcname(x)