Skip to content

Commit 026d460

Browse files
committed
print ref and actual values in testing.lobster.verify_inputs ValueError
1 parent 3233e68 commit 026d460

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/atomate2/utils/testing/lobster.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,12 @@ def verify_inputs(ref_path: str | Path, lobsterin_settings: Sequence[str]) -> No
177177
ref = Lobsterin.from_file(Path(ref_path) / "inputs" / "lobsterin")
178178

179179
for key in lobsterin_settings:
180-
if user.get(key) != ref.get(key):
181-
raise ValueError(f"lobsterin value of {key} is inconsistent!")
180+
ref_val, user_val = ref.get(key), user.get(key)
181+
if ref_val != user_val:
182+
raise ValueError(
183+
f"lobsterin value of {key} is inconsistent, got {user_val} but "
184+
f"expected {ref_val}!"
185+
)
182186

183187

184188
def copy_lobster_outputs(ref_path: str | Path) -> None:

0 commit comments

Comments
 (0)