コード例 #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
コード例 #2
0
ファイル: test_sphinx.py プロジェクト: ayang/doc2dash
def test_guess_type_by_name():
    assert sphinx._guess_type_by_name('foo()') == types.FUNCTION
    assert sphinx._guess_type_by_name('foo') == types.CONSTANT
コード例 #3
0
ファイル: test_sphinx.py プロジェクト: asheraScout/doc2dash
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)