From 7560e2bff076c00babc80c4fb1fa44402a6370f1 Mon Sep 17 00:00:00 2001 From: Lars Bogner Date: Mon, 24 Aug 2026 11:15:51 +0200 Subject: [PATCH] Fix LaTeX-unavailable skip check in analyze metrics smoke test CliRunner stores an uncaught exception in result.exception, not result.output, so the skip condition never matched and the test failed outright on CI machines without LaTeX installed. Co-Authored-By: Claude Sonnet 5 --- tests/test_training_plots.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_training_plots.py b/tests/test_training_plots.py index e46d0bd..b095e70 100644 --- a/tests/test_training_plots.py +++ b/tests/test_training_plots.py @@ -327,7 +327,7 @@ def test_cli_analyze_metrics_smoke(tmp_path: Path): runner = CliRunner() result = runner.invoke(app, ["analyze", "metrics", str(run_dir), "--out", str(out_dir)]) - if result.exit_code != 0 and "LaTeX" in str(result.output): + if result.exit_code != 0 and "latex" in (str(result.output) + str(result.exception)).lower(): pytest.skip("LaTeX rendering unavailable") - assert result.exit_code == 0, result.output + assert result.exit_code == 0, result.output or result.exception assert any(out_dir.glob("*.pdf"))