Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print invalid kpath_scheme, use_symmetrized_structure and list valid ones in PhononMaker error messages #728

Merged
merged 6 commits into from
Feb 18, 2024
Prev Previous commit
update expected ValueError msg in test_phonons.py
  • Loading branch information
janosh committed Feb 18, 2024
commit 458fa88427ba020230b5b84e831b409cad118292
9 changes: 7 additions & 2 deletions tests/vasp/flows/test_phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@ def test_phonon_wf_only_displacements_kpath_raises_no_cell_change(

with pytest.raises(
ValueError,
match="can only use other kpath schemes with the primitive standard structure",
match=f"You can't use {kpath_scheme=} with the primitive standard "
"structure, please use seekpath",
):
PhononMaker(
min_length=3.0,
Expand Down Expand Up @@ -788,7 +789,11 @@ def test_phonon_wf_only_displacements_kpath_raises(mock_vasp, clean_dir, kpath_s

# automatically use fake VASP and write POTCAR.spec during the test
mock_vasp(ref_paths, fake_run_vasp_kwargs)
with pytest.raises(ValueError, match="can only use other kpath schemes with the"):
with pytest.raises(
ValueError,
match=f"You can't use {kpath_scheme=} with the primitive standard "
"structure, please use seekpath",
):
PhononMaker(
min_length=3.0,
bulk_relax_maker=None,
Expand Down
Loading