From b3fb537f29e50c29503add8392ad04c69312d308 Mon Sep 17 00:00:00 2001 From: dcarron <daniel.carron@idiap.ch> Date: Mon, 22 Apr 2024 12:15:57 +0200 Subject: [PATCH] [test] Update paths --- src/mednet/scripts/experiment.py | 2 +- tests/test_cli.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mednet/scripts/experiment.py b/src/mednet/scripts/experiment.py index 9f7aff12..538ddf63 100644 --- a/src/mednet/scripts/experiment.py +++ b/src/mednet/scripts/experiment.py @@ -141,7 +141,7 @@ def experiment( ctx.invoke( evaluate, predictions=predictions_output, - output=output_folder, + output_folder=output_folder, threshold="validation", ) diff --git a/tests/test_cli.py b/tests/test_cli.py index e4923621..4ee0e2c6 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -404,23 +404,24 @@ def test_evaluate_pasa_montgomery(temporary_basedir): with stdout_logging() as buf: prediction_path = temporary_basedir / "predictions.json" - output_path = temporary_basedir / "evaluation.json" + evaluation_filename = "evaluation.json" + evaluation_file = temporary_basedir / evaluation_filename result = runner.invoke( evaluate, [ "-vv", "montgomery", f"--predictions={str(prediction_path)}", - f"--output={str(output_path)}", + f"--output-folder={str(temporary_basedir)}", "--threshold=test", ], ) _assert_exit_0(result) - assert output_path.exists() - assert output_path.with_suffix(".meta.json").exists() - assert output_path.with_suffix(".rst").exists() - assert output_path.with_suffix(".pdf").exists() + assert evaluation_file.exists() + assert evaluation_file.with_suffix(".meta.json").exists() + assert evaluation_file.with_suffix(".rst").exists() + assert evaluation_file.with_suffix(".pdf").exists() keywords = { r"^Setting --threshold=.*$": 1, -- GitLab