Ejemplo n.º 1
0
def test_guess_type_by_name():
    assert sphinx._guess_type_by_name("foo()") == types.FUNCTION
    assert sphinx._guess_type_by_name("foo") == types.CONSTANT
Ejemplo n.º 2
0
def test_guess_type_by_name():
    assert sphinx._guess_type_by_name('foo()') == types.FUNCTION
    assert sphinx._guess_type_by_name('foo') == types.CONSTANT
Ejemplo n.º 3
0
def test_guess_type_by_name(name, expected_type):
    """
    Types are guessed correctly according to the name of a symbol.
    """
    assert expected_type == sphinx._guess_type_by_name(name)