Skip to content

Commit

Permalink
add matching error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
daico007 committed Aug 19, 2024
1 parent e833e4b commit 0dd052b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mosdef_dihedral_fit/tests/test_math_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,20 @@ def test_dihedral_angle_error_3(self):
def test_check_previous_qm_values_match(self):
# Without error
all_value_list = [[1], [2], [3]]

check_return = mdf_math.check_previous_qm_values_match(
all_value_list, [3], "value_names", "qm_engine", "log_file"
)
# With error
msg = (
f"ERROR: The qm_engine log file 'log_file' does not have the same "
f"value_name = [4], "
f"as other previous entries = [3]. "
f"The molecule or property may not be the same in the multiple qm_engine log files, "
f"but this may be be desired by the user to obtain a more general dihedral fit."
)
with pytest.raises(
ValueError,
):
check_return = mdf_math.check_previous_qm_values_match(
all_value_list, [4], "value_names", "qm_engine", "log_file"
all_value_list, [4], "value_name", "qm_engine", "log_file"
)

0 comments on commit 0dd052b

Please sign in to comment.