Skip to content

Commit

Permalink
Example_restart: add messages to the asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha committed Jan 31, 2024
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
Expand Up @@ -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.
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit e87f38b

Please sign in to comment.