From 99868ee39442936a11329381b24ec7c69ee1471d Mon Sep 17 00:00:00 2001 From: ElliottKasoar <45317199+ElliottKasoar@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:33:08 +0100 Subject: [PATCH] Fix test --- tests/calculations/test_descriptors.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/calculations/test_descriptors.py b/tests/calculations/test_descriptors.py index c113eeb..0e5769b 100644 --- a/tests/calculations/test_descriptors.py +++ b/tests/calculations/test_descriptors.py @@ -98,12 +98,20 @@ def test_run_descriptors(model_folder, janus_code): assert obtained_res["mace_descriptors"] == pytest.approx([-0.00207855, -0.00919008]) -def test_example_descriptors(example_path): +def test_example_descriptors(example_path, janus_code): """Test running descriptors calculation using the example file provided.""" example_file_path = example_path / "submit_descriptors.py" - command = ["verdi", "run", example_file_path, "janus@localhost"] + command = [ + "verdi", + "run", + example_file_path, + f"{janus_code.label}@{janus_code.computer.label}", + ] # Execute the command result = subprocess.run(command, capture_output=True, text=True, check=False) assert result.stderr == "" assert result.returncode == 0 + assert "results from calculation:" in result.stdout + assert "'results_dict':