Skip to content

Commit

Permalink
test: debug cli test
Browse files Browse the repository at this point in the history
  • Loading branch information
RaczeQ committed Jul 31, 2024
1 parent 867e285 commit 92a0898
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
5 changes: 0 additions & 5 deletions tests/base/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -701,17 +700,13 @@ 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])
output = result.stdout

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]

Expand Down

0 comments on commit 92a0898

Please sign in to comment.