Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def mock_runtime_env(monkeypatch):

@pytest.fixture(scope="session")
def runner() -> CliRunner:
return CliRunner()
return CliRunner(env={"COLUMNS": "80"})


@contextmanager
Expand Down Expand Up @@ -1887,7 +1887,9 @@ def test_init_interactive_cli_mode_simple(runner: CliRunner, tmp_path: Path):
assert "no_diff: true" in config_path.read_text()


def test_init_interactive_engine_install_msg(runner: CliRunner, tmp_path: Path):
def test_init_interactive_engine_install_msg(runner: CliRunner, tmp_path: Path, monkeypatch):
monkeypatch.setattr("sqlmesh.utils.rich.console.width", 80)

# Engine install text should not appear for built-in engines like DuckDB
# Input: 1 (DEFAULT template), 1 (duckdb engine), 1 (DEFAULT CLI mode)
result = runner.invoke(
Expand Down
1 change: 1 addition & 0 deletions tests/utils/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def test_wrapper(*args, **kwargs):
orig_console = get_console()
try:
new_console = TerminalConsole()
new_console.console.width = 80
new_console.console.no_color = True
set_console(new_console)
func(*args, **kwargs)
Expand Down
Loading