def test_guess_type_by_name():
    assert sphinx._guess_type_by_name("foo()") == types.FUNCTION
    assert sphinx._guess_type_by_name("foo") == types.CONSTANT
Exemple #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
Exemple #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)