From a55f6745e933578d61f69de2d22d7ce4b8f264ee Mon Sep 17 00:00:00 2001 From: Alpamys Date: Wed, 1 Apr 2026 14:01:39 +0500 Subject: [PATCH] fix: use ANSI-safe assertions in deploy help tests (macOS CI fix) Rich markup in Typer help output inserts ANSI escape codes around --flag names on macOS, breaking exact string matches. Check for lowercase words instead of --prefixed flags. --- tests/test_deploy_ollama.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_deploy_ollama.py b/tests/test_deploy_ollama.py index 93fd92c..ccd198a 100644 --- a/tests/test_deploy_ollama.py +++ b/tests/test_deploy_ollama.py @@ -462,8 +462,8 @@ def test_deploy_ollama_help(): result = runner.invoke(app, ["deploy", "ollama", "--help"]) assert result.exit_code == 0 assert "ollama" in result.output.lower() - assert "--model" in result.output - assert "--name" in result.output + assert "model" in result.output.lower() + assert "name" in result.output.lower() def test_deploy_help(): @@ -692,7 +692,7 @@ def test_deploy_create_fails(mock_detect_fn, mock_deploy_fn, tmp_path, monkeypat def test_export_deploy_flag_in_help(): result = runner.invoke(app, ["export", "--help"]) assert result.exit_code == 0 - assert "--deploy" in result.output + assert "deploy" in result.output.lower() # ─── _auto_detect_template ───