Exemplo n.º 1
0
def assert_default_test_entry(entry: Entry) -> None:
    """Asserts that the passed entry is the default testing entry.

    Args:
        entry: the entry to assert.
    """
    entry.escape_special_chars()
    assert entry.label == "Grimsley_2019"
    assert entry.data["doi"] == "10.1038/s41467-019-10988-2"
    assert entry.data["url"] == [
        "https://doi.org/10.1038%2Fs41467-019-10988-2"
    ]
    assert entry.data["year"] == 2019
    assert entry.data["month"] == "jul"
    assert entry.data[
        "publisher"] == "Springer Science and Business Media {LLC}"
    assert entry.data["volume"] == 10
    assert entry.data["number"] == 1
    assert (
        entry.data["author"] ==
        "Harper R. Grimsley and Sophia E. Economou and Edwin Barnes and Nicholas J. Mayhall"
    )
    assert (
        entry.data["title"] ==
        "An adaptive variational algorithm for exact molecular simulations on a quantum computer"
    )
    assert entry.data["journal"] == "Nature Communications"
Exemplo n.º 2
0
def assert_default_test_entry(entry: Entry) -> None:
    """Asserts that the passed entry is the default testing entry.

    Args:
        entry: the entry to assert.
    """
    entry.escape_special_chars()
    assert entry.label == "Cao2018"
    assert entry.data["archivePrefix"] == "arXiv"
    assert entry.data["arxivid"].startswith("1812.09976")
    assert (
        entry.data["author"] ==
        "Yudong Cao and Jonathan Romero and Jonathan P. Olson and Matthias Degroote and "
        +
        "Peter D. Johnson and M{\\'a}ria Kieferov{\\'a} and Ian D. Kivlichan and Tim Menke "
        +
        "and Borja Peropadre and Nicolas P. D. Sawaya and Sukin Sim and Libor Veis and "
        + "Al{\\'a}n Aspuru-Guzik")
    assert entry.data["doi"].startswith("10.1021/acs.chemrev.8b00803")
    assert entry.data[
        "title"] == "Quantum Chemistry in the Age of Quantum Computing"
    assert entry.data["year"] == 2018
    assert entry.data["_download"] == "http://arxiv.org/pdf/1812.09976v2"