Exemplo n.º 1
0
def test_extract_arxiv_additional_chars():
    """
    Test getting clean arXiv identifier with additional chars.
    Delivered for article: 10.1140/epjc/s10052-018-6500-y
    """
    with raises(UnicodeEncodeError):
        clean_arxiv(u'"1808.01899\u201c')
Exemplo n.º 2
0
def test_extract_arxiv_additional_chars():
    """
    Test getting clean arXiv identifier with additional chars.
    Delivered for article: 10.1140/epjc/s10052-018-6500-y
    """
    with raises(UnicodeEncodeError):
        clean_arxiv(u'"1808.01899\u201c')
Exemplo n.º 3
0
def get_first_arxiv(record):
    return clean_arxiv(get_value(record, 'arxiv_eprints.value[0]'))
Exemplo n.º 4
0
def test_extract_arxiv_with_categ():
    """
    Test for arxiv with category.
    Delivered for article: 10.1140/epjc/s10052-019-6679-6
    """
    assert clean_arxiv('arXiv:1803.07217 [gr-qc]') == '1803.07217'
Exemplo n.º 5
0
def test_extract_arxiv_none():
    """Test for None param."""
    assert clean_arxiv(None) is None
Exemplo n.º 6
0
def test_extract_arxiv_id_complex():
    """Test getting clean arXiv identifier."""
    assert clean_arxiv('arXiv:hep-th/0401244') == 'hep-th/0401244'
Exemplo n.º 7
0
def test_extract_arxiv_id_prefix():
    """Test getting clean arXiv identifier."""
    assert clean_arxiv('arxiv:12356.78') == '12356.78'
Exemplo n.º 8
0
def test_extract_arxiv_with_categ():
    """
    Test for arxiv with category.
    Delivered for article: 10.1140/epjc/s10052-019-6679-6
    """
    assert clean_arxiv('arXiv:1803.07217 [gr-qc]') == '1803.07217'
Exemplo n.º 9
0
def test_extract_arxiv_none():
    """Test for None param."""
    assert clean_arxiv(None) is None
Exemplo n.º 10
0
def test_extract_arxiv_id_complex():
    """Test getting clean arXiv identifier."""
    assert clean_arxiv('arXiv:hep-th/0401244') == 'hep-th/0401244'
Exemplo n.º 11
0
def test_extract_arxiv_id_prefix():
    """Test getting clean arXiv identifier."""
    assert clean_arxiv('arxiv:12356.78') == '12356.78'
Exemplo n.º 12
0
def get_first_arxiv(record):
    return clean_arxiv(get_value(record, 'arxiv_eprints.value[0]'))