From 92a0898fbd7833ffec8101ff348c1dda89ae3452 Mon Sep 17 00:00:00 2001 From: Kamil Raczycki Date: Wed, 31 Jul 2024 10:35:05 +0200 Subject: [PATCH] test: debug cli test --- .github/workflows/_tests.yml | 1 + .github/workflows/manual_tests.yml | 1 + tests/base/test_cli.py | 5 ----- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/_tests.yml b/.github/workflows/_tests.yml index 5c1057cd..8a57cff9 100644 --- a/.github/workflows/_tests.yml +++ b/.github/workflows/_tests.yml @@ -18,6 +18,7 @@ jobs: env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} + COLUMNS: 120 steps: - uses: actions/checkout@v3 - name: Setup Python ${{ matrix.python-version }} diff --git a/.github/workflows/manual_tests.yml b/.github/workflows/manual_tests.yml index 858e7800..b3f706e9 100644 --- a/.github/workflows/manual_tests.yml +++ b/.github/workflows/manual_tests.yml @@ -13,6 +13,7 @@ jobs: env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} + COLUMNS: 120 steps: - uses: actions/checkout@v3 - name: Setup Python ${{ matrix.python-version }} diff --git a/tests/base/test_cli.py b/tests/base/test_cli.py index 30d53346..de02cb61 100644 --- a/tests/base/test_cli.py +++ b/tests/base/test_cli.py @@ -6,7 +6,6 @@ import pytest from pytest_mock import MockerFixture -from rich.console import Console from typer.testing import CliRunner from quackosm import cli @@ -701,7 +700,6 @@ def test_displaying_osm_extracts( capsys: pytest.CaptureFixture, ) -> None: """Test if displaying OSM extracts works.""" - mocker.patch("rich.get_console", return_value=Console(width=999)) with capsys.disabled(): osm_source_command = ["--osm-extract-source", osm_source.value] if osm_source else [] result = runner.invoke(cli.app, [f"--{command}", *osm_source_command]) @@ -709,9 +707,6 @@ def test_displaying_osm_extracts( assert result.exit_code == 0 assert len(output) > 0 - from rich import get_console - - print(get_console().width) osm_sources_without_any = [src for src in OsmExtractSource if src != OsmExtractSource.any]