From e87f38b8cf58fd5a3b509df82410734803c3cea8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Yakutovich Date: Wed, 31 Jan 2024 10:06:33 +0000 Subject: [PATCH] Example_restart: add messages to the asserts. --- examples/single_calculations/example_restart.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/single_calculations/example_restart.py b/examples/single_calculations/example_restart.py index c9027d6e..6b9d3cd4 100644 --- a/examples/single_calculations/example_restart.py +++ b/examples/single_calculations/example_restart.py @@ -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")