Ejemplo n.º 1
0
def test_add_entries(capfd, mock_init, mock_prompt, entries):
    bm.add_entries('new')
    captured = capfd.readouterr()
    assert captured.out == (
        "Enter a BibTeX entry (press META+ENTER or ESCAPE ENTER when done):\n"
        "\n\nMerged 1 new entries.\n")
Ejemplo n.º 2
0
def test_add_entries_raise(capfd, mock_init, mock_prompt):
    with pytest.raises(
            ValueError,
            match="Mismatched braces in line 0:\n'this will fail}'"):
        bm.add_entries('new')