diff --git a/tests/test_cli.py b/tests/test_cli.py index 7b58b03df9c3a5a516d590c40c1044412c8744bd..1b5ec0e45ac9be636b1e88cca08e2c01a7a54c16 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -154,12 +154,6 @@ def test_evaluate_help(): _check_help(evaluate) -def test_compare_help(): - from ptbench.scripts.compare import compare - - _check_help(compare) - - @pytest.mark.skip(reason="Test need to be updated") @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") def test_train_pasa_montgomery(temporary_basedir): @@ -410,51 +404,6 @@ def test_evaluate_pasa_montgomery(temporary_basedir): ) -@pytest.mark.skip(reason="Test need to be updated") -@pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") -def test_compare_pasa_montgomery(temporary_basedir): - from ptbench.scripts.compare import compare - - runner = CliRunner() - - with stdout_logging() as buf: - predictions_folder = str(temporary_basedir / "predictions") - output_folder = str(temporary_basedir / "comparisons") - result = runner.invoke( - compare, - [ - "-vv", - "train", - f"{predictions_folder}/train/predictions.csv", - "test", - f"{predictions_folder}/test/predictions.csv", - f"--output-figure={output_folder}/compare.pdf", - f"--output-table={output_folder}/table.txt", - "--threshold=0.5", - ], - ) - _assert_exit_0(result) - - # check comparisons are there - assert os.path.exists(os.path.join(output_folder, "compare.pdf")) - assert os.path.exists(os.path.join(output_folder, "table.txt")) - - keywords = { - r"^Dataset '\*': threshold =.*$": 1, - r"^Loading predictions from.*$": 2, - r"^Tabulating performance summary...": 1, - } - buf.seek(0) - logging_output = buf.read() - - for k, v in keywords.items(): - assert _str_counter(k, logging_output) == v, ( - f"Count for string '{k}' appeared " - f"({_str_counter(k, logging_output)}) " - f"instead of the expected {v}:\nOutput:\n{logging_output}" - ) - - @pytest.mark.skip(reason="Test need to be updated") @pytest.mark.skip_if_rc_var_not_set("datadir.montgomery") def test_train_mlp_montgomery_rs(temporary_basedir, datadir):