From a370f80f90868bd88bf57b94bfd75c94ef032b6c Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Mon, 28 Jul 2025 15:49:58 +0545 Subject: [PATCH] try to fix test with new rich (#10815) --- tests/func/utils/test_strict_yaml.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/func/utils/test_strict_yaml.py b/tests/func/utils/test_strict_yaml.py index 44964b85d..7aba6c44c 100644 --- a/tests/func/utils/test_strict_yaml.py +++ b/tests/func/utils/test_strict_yaml.py @@ -325,10 +325,12 @@ def force_posixpath(mocker): @pytest.fixture def fixed_width_term(mocker): """Fixed width console.""" - from rich.console import Console + from rich.console import Console, ConsoleDimensions mocker.patch.object( - Console, "width", new_callable=mocker.PropertyMock(return_value=80) + Console, + "size", + new_callable=mocker.PropertyMock(return_value=ConsoleDimensions(80, 25)), )