def test_open_file_not_found(mock_init_sample): with pytest.raises(ValueError, match="Requested PDF file 'AASteam2018.pdf' does not exist " f"in database PDF dir '{u.BM_PDF()[:-1]}'"): pm.open(pdf='AASteam2018.pdf')
def test_open_no_pdf(mock_init_sample): with pytest.raises(ValueError, match='Entry does not have a PDF in the database'): pm.open(key='AASteamHendrickson2018aastex62')
def test_open_no_bibtex(mock_init_sample): with pytest.raises(ValueError, match='Requested entry does not exist in database'): pm.open(key='AASteamHendrickson2018')
def test_open_nones(mock_init_sample): with pytest.raises(ValueError, match='At least one of the arguments must be not None'): pm.open()