From e12a92db722401ad08a9c3024e59de4ade3029c7 Mon Sep 17 00:00:00 2001 From: Alpamys Date: Tue, 7 Jul 2026 18:21:34 +0500 Subject: [PATCH] =?UTF-8?q?test(v0.71.32):=20CI=20fix=20=E2=80=94=20ANSI-s?= =?UTF-8?q?trip=20+=20wide=20COLUMNS=20on=20infer=20--help=20--task=20asse?= =?UTF-8?q?rtion=20(Rich=20splits=20flag=20names)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_v07132.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_v07132.py b/tests/test_v07132.py index f39238f..1b1025d 100644 --- a/tests/test_v07132.py +++ b/tests/test_v07132.py @@ -789,13 +789,19 @@ class TestAsrTrainerSetup: class TestAsrInfer: def test_help_shows_task_option(self): + import re + from typer.testing import CliRunner from soup_cli.cli import app - result = CliRunner().invoke(app, ["infer", "--help"]) + # Wide COLUMNS + ANSI-strip: Rich splits flag names with color codes and + # wraps at a narrow CI terminal, so a raw substring check is flaky + # (v0.71.26 precedent). + result = CliRunner().invoke(app, ["infer", "--help"], env={"COLUMNS": "200"}) assert result.exit_code == 0, result.output - assert "--task" in result.output + cleaned = re.sub(r"\x1b\[[0-9;]*m", "", result.output) + assert "--task" in cleaned def test_infer_asr_writes_transcriptions_and_wer(self, tmp_path, monkeypatch): import json