Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 690d1783 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update basis/test_04_RecordPubli.

parent 472e1cf3
# -*- coding: utf-8 -*-
"""test_04_RecordPubli
Test all methods of the RecordPubli class for a given article:
......@@ -39,7 +38,7 @@ def recins():
return load_record("inspirehep.net", 1319638)
def test_constructor(reccds):
def test_constructor_cds_04001(reccds):
"""test the method _process_authors and _process_publication_info.
"""
......@@ -68,7 +67,7 @@ def test_constructor(reccds):
assert paper.pagination == "P12005"
def test_to_initial():
def test_to_initial_04002():
assert to_initial(u"Albert") == u"A."
assert to_initial(u"Antonio Augusto") == u"A. A."
......@@ -77,15 +76,16 @@ def test_to_initial():
assert to_initial(u"Marie-Hélène") == u"M.-H."
assert to_initial(u"Marie - Pierre") == u"M.-P."
# ............................................................................
#
# Section devoted to authors
#
def test_is_authors(reccds):
def test_is_authors_cds_04003(reccds):
assert reccds.is_authors()
def test_authors_as_list(reccds):
def test_authors_as_list_cds_04004(reccds):
authors = reccds.authors_as_list()
assert len(authors) == reccds["number_of_authors"]
......@@ -95,16 +95,16 @@ def test_authors_as_list(reccds):
assert authors[-1] == u"Zvyagin, Alexander"
def test_first_author(reccds):
def test_first_author_cds_04005(reccds):
assert reccds.first_author() == u"Aaij, Roel"
def test_find_authors(reccds):
def test_find_authors_cds_04006(reccds):
assert reccds.find_authors("Leo") == \
u"Beaucourt, Leo, Kravchuk, Leonid, Leo, Sabato"
def test_reformat_author(reccds):
def test_reformat_author_cds_04007(reccds):
reccds.reformat_authors("F. Last")
authors = reccds.authors_as_list()
......@@ -123,12 +123,12 @@ def test_reformat_author(reccds):
#
# Section devoted to affiliation
#
def test_is_affiliations(reccds):
def test_is_affiliations_cds_04008(reccds):
assert reccds.is_affiliations()
assert reccds.is_affiliation_for_all()
def test_institutes(reccds):
def test_institutes_cds_04009(reccds):
institutes = reccds.institutes()
......@@ -137,7 +137,7 @@ def test_institutes(reccds):
assert institutes[-1] == "Zurich U."
def test_find_affiliation(reccds):
def test_find_affiliation_cds_04010(reccds):
affiliation = reccds.find_affiliation(r"Marseille, CPPM|CPPM, Marseille")
assert affiliation == "Marseille, CPPM"
......@@ -146,11 +146,11 @@ def test_find_affiliation(reccds):
#
# Section devoted to authors and institutes
#
def test_first_author_institutes(reccds):
def test_first_author_institutes_cds_04011(reccds):
assert reccds.first_author_institutes() == "NIKHEF, Amsterdam"
def test_find_authors_by_affiliation(reccds):
def test_find_authors_by_affiliation_cds_04012(reccds):
pattern = "CPPM, Marseille|Marseille, CPPM"
authors = reccds.find_authors_by_affiliation(pattern, sep=u"|")
......@@ -165,63 +165,69 @@ def test_find_authors_by_affiliation(reccds):
#
# Other methods
#
def test_collaboration(reccds):
def test_collaboration_cds_04013(reccds):
assert reccds.collaboration() == "LHCb Collaboration"
def test_is_published(reccds):
def test_is_published_cds_04014(reccds):
assert reccds.is_published()
# Paper is published but there are error in the paper reference
# Correct reference is Eur. Phys. J. C 75 (2015) 158
# But volume is not defined and pagination is wrong (75)
record = load_record("cds.cern.ch", 1753190)
assert not record.is_published()
def test_is_with_erratum(reccds):
def test_is_with_erratum_cds_04015(reccds):
assert not reccds.is_with_erratum()
def test_paper_info(reccds, recins):
def test_paper_info_cds_04016(reccds):
assert reccds.paper_editor() == "JINST"
assert reccds.paper_pages() == "P12005"
assert reccds.paper_volume() == "9"
assert reccds.paper_year() == "2014"
def test_paper_info_ins_04017(recins):
assert recins.paper_editor() == "JINST"
assert recins.paper_pages() == "P12005"
assert recins.paper_volume() == "9"
assert recins.paper_year() == "2014"
def test_paper_reference(reccds):
def test_paper_reference_cds_04018(reccds):
assert reccds.paper_reference() == "JINST 9 2014 P12005"
def test_preprint_number(reccds, recins):
def test_preprint_number_cds_04019(reccds):
assert reccds.preprint_number() == "arXiv:1410.0149"
def test_preprint_number_ins_04020(recins):
assert recins.preprint_number() == "arXiv:1410.0149"
def test_paper_url(reccds, recins):
def test_paper_url_cds_04021(reccds):
assert reccds.paper_url() == "http://arxiv.org/pdf/1410.0149.pdf"
def test_paper_url_ins_04022(recins):
assert recins.paper_url() == \
"http://inspirehep.net/record/1319638/files/arXiv:1410.0149.pdf"
def test_report_number(reccds, recins):
def test_report_number_cds_04023(reccds):
assert reccds.report_number() == \
"CERN-PH-EP-2014-221, LHCB-PAPER-2014-047, LHCB-PAPER-2014-047-003"
def test_report_number_ins_04024(recins):
assert recins.report_number() == "CERN-PH-EP-2014-221, LHCB-PAPER-2014-047"
def test_submitted(reccds, recins):
def test_submitted_cds_04025(reccds):
assert reccds.submitted() == "01 Oct 2014"
def test_submitted_ins_04026(recins):
assert recins.submitted() == "2014-10-01"
def test_title(reccds):
def test_title_cds_04027(reccds):
assert reccds.title() == "Precision luminosity measurements at LHCb"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment