def test_lookup_role_fail_name(basis_name): """Test get_basis with bad versions """ with pytest.raises(KeyError, match=r'Basis set.*does not exist'): bse.lookup_basis_by_role(basis_name, 'rifit')
def test_lookup_role_fail_role(role): """Test get_basis with bad role """ with pytest.raises(RuntimeError, match=r'Role.*(not a valid role|exist for)'): bse.lookup_basis_by_role('def2-tzvp', role)
def test_lookup_by_role(primary_basis, role, expected): """Test looking up data by role """ bs = bse.lookup_basis_by_role(primary_basis, role) assert bs.lower() == expected.lower()