This is an automated email from the ASF dual-hosted git repository.
shahar1 pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-4-test by this push:
new a3eaf87612b [v3-4-test] Keep Breeze shim warning tests independent of
the terminal width (#76587) (#77070)
a3eaf87612b is described below
commit a3eaf87612b9bb8e0ee2f04ad3769842aa986a8d
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Nov 13 21:47:24 2026 +0000
[v3-4-test] Keep Breeze shim warning tests independent of the terminal
width (#76587) (#77070)
`breeze verify` lists this suite as a host command, but outside CI the
console has no fixed width. Rich then wraps at the detected width, and with
a long `tmp_path` the asserted warning text no longer stays on one line, so
three tests fail with no code at fault.
(cherry picked from commit 7ba7e7ad6f09fc194c4f826f9e40ea9e935dbc50)
Co-authored-by: Shahar Epstein <[email protected]>
---
dev/breeze/tests/test_shim_version_check.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dev/breeze/tests/test_shim_version_check.py
b/dev/breeze/tests/test_shim_version_check.py
index 3364ddf951d..c0e6ae93b26 100644
--- a/dev/breeze/tests/test_shim_version_check.py
+++ b/dev/breeze/tests/test_shim_version_check.py
@@ -23,6 +23,7 @@ from unittest import mock
import pytest
from airflow_breeze.utils import path_utils
+from airflow_breeze.utils.console import get_console
from airflow_breeze.utils.path_utils import (
BREEZE_SHIM_MARKER,
_parse_shim_version,
@@ -36,6 +37,16 @@ from airflow_breeze.utils.path_utils import (
ACTUAL_AIRFLOW_SOURCES = Path(__file__).parents[3].resolve()
[email protected](autouse=True)
+def wide_console(monkeypatch):
+ # Rich wraps at the detected width, which splits the messages asserted
below when
+ # tmp_path is long and CI's fixed console width is not in effect.
+ monkeypatch.setenv("COLUMNS", "250")
+ get_console.cache_clear()
+ yield
+ get_console.cache_clear()
+
+
def _managed_shim(version_line: str | None) -> str:
lines = ["#!/usr/bin/env bash", BREEZE_SHIM_MARKER]
if version_line is not None: