Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example_restart: add messages to the asserts.
Browse files Browse the repository at this point in the history
yakutovicha committed Jan 31, 2024

Verified

This commit was signed with the committer’s verified signature.
bostonaholic Matthew Boston
1 parent 081c523 commit e87f38b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/single_calculations/example_restart.py
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ def example_restart(cp2k_code):
sys.exit(1)

print(calc1_outputs)
assert "output_structure" in calc1_outputs
assert "output_structure" in calc1_outputs, "The output_structure is missing."
print("OK, output_structure is present, even though the calculation has failed.")

# Set up and start the second calculation.
@@ -160,7 +160,9 @@ def example_restart(cp2k_code):

# Ensure that this warning originates from overwritting coordinates.
output = calc2["retrieved"].base.repository.get_object_content("aiida.out")
assert re.search("WARNING .* :: Overwriting coordinates", output)
assert re.search(
"WARNING .* :: Overwriting coordinates", output
), "No warning about overwritting coordinates."


@click.command("cli")

0 comments on commit e87f38b

Please sign in to comment.