本文整理汇总了Python中inspirehep.utils.latex.Latex._get_title方法的典型用法代码示例。如果您正苦于以下问题:Python Latex._get_title方法的具体用法?Python Latex._get_title怎么用?Python Latex._get_title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类inspirehep.utils.latex.Latex
的用法示例。
在下文中一共展示了Latex._get_title方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_title_from_titles_an_empty_list
# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_title [as 别名]
def test_get_title_from_titles_an_empty_list():
titles_an_empty_list = Record({'titles': []})
latex = Latex(titles_an_empty_list, 'latex_eu')
expected = ''
result = latex._get_title()
assert expected == result
示例2: test_get_title_no_titles
# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_title [as 别名]
def test_get_title_no_titles():
no_titles = Record({})
latex = Latex(no_titles, 'latex_eu')
expected = ''
result = latex._get_title()
assert expected == result
示例3: test_get_title_from_titles_not_a_list
# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_title [as 别名]
def test_get_title_from_titles_not_a_list():
titles_not_a_list = Record({
'titles': {
'title': 'Partial Symmetries of Weak Interactions'
}
})
latex = Latex(titles_not_a_list, 'latex_eu')
expected = 'Partial Symmetries of Weak Interactions'
result = latex._get_title()
assert expected == result
示例4: test_get_title_from_titles_a_list_with_one_element
# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_title [as 别名]
def test_get_title_from_titles_a_list_with_one_element():
titles_a_list_with_one_element = Record({
'titles': [
{'title': 'Partial Symmetries of Weak Interactions'}
]
})
latex = Latex(titles_a_list_with_one_element, 'latex_eu')
expected = 'Partial Symmetries of Weak Interactions'
result = latex._get_title()
assert expected == result
示例5: test_get_title_from_titles_a_list_with_two_elements
# 需要导入模块: from inspirehep.utils.latex import Latex [as 别名]
# 或者: from inspirehep.utils.latex.Latex import _get_title [as 别名]
def test_get_title_from_titles_a_list_with_two_elements():
titles_a_list_with_two_elements = Record({
'titles': [
{'title': 'Broken Symmetries and the Masses of Gauge Bosons'},
{'title': 'BROKEN SYMMETRIES AND THE MASSES OF GAUGE BOSONS.'}
]
})
latex = Latex(titles_a_list_with_two_elements, 'latex_eu')
expected = 'Broken Symmetries and the Masses of Gauge Bosons'
result = latex._get_title()
assert expected == result