test_acl_ins1319638.py 2.51 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
# -*- coding: utf-8 -*-
"""ARTICLE

    http://inspirehep.net/record/1319638
    (same as http://cds.cern.ch/record/1951625)


    Precision luminosity measurements at LHCb,
    J. Instrum. 9 (2014) P12005
    arXiv:1410.0149
    704 authors

No correction are applied to the record.
Allow to test the brut force decoding with its mistakes.

Note:
    * The first author is not in the author list
    * Collaboration is wrong: LHCb
    * The editor is JINST

"""
import pytest


from helper import load_record


@pytest.fixture(scope="module")
def record():
    return load_record('inspirehep.net', 1319638)


def test_authors(record):
    authors = record.authors_as_list()

    assert len(authors) == 703
    assert authors[0] == "Adeva, Bernardo"
    assert authors[343] == "Le Gac, Renaud"
    assert authors[-1] == "Zvyagin, Alexander"


def test_collaboration(record):
    assert record.collaboration() == "LHCb"


def test_first_author(record):
    assert record.first_author() == "Aaij, Roel"


def test_first_institutes(record):
    assert record.first_author_institutes() == "NIKHEF, Amsterdam"


def test_host(record):
    assert record.host() == "inspirehep.net"

def test_id(record):
    assert record.id() == "1319638"


def test_institutes(record):
    institutes = record.institutes()

    assert institutes[0] == "AGH-UST, Cracow"
    assert institutes[44] == "MIT"
    assert institutes[-1] == "Zurich U."

    assert record.is_institute_defined() == True


def test_is_article(record):
    assert record.is_conference_data() == False
    assert record.is_published() == True
    assert record.is_thesis() == False


def test_oai(record):
    assert record.oai() == "oai:inspirehep.net:1319638"
    assert record.oai_url() == "http://inspirehep.net/record/1319638"


def test_paper_reference(record):
    assert record.paper_editor() == "JINST"
    assert record.paper_pages() == "P12005"
    assert record.paper_volume() == "9"
    assert record.paper_year() == "2014"


def test_paper_url(record):
    assert record.paper_url() == "http://inspirehep.net/record/1319638/files/arXiv:1410.0149.pdf"


def test_preprint_number(record, request):
    assert record.preprint_number() == "arXiv:1410.0149"


def test_submitted(record):
    assert record.submitted() == ["2014-10-01"]


def test_report_number(record):
    assert record.report_number() == "CERN-PH-EP-2014-221, LHCB-PAPER-2014-047"


def test_title(record):
    assert record.title() == "Precision luminosity measurements at LHCb"


def test_year(record):
    assert record.year() == "2014"