clan-cli/flash: make tests runnable in sandbox

This commit is contained in:
Jörg Thalheim
2025-08-14 15:15:22 +02:00
parent a6ef38dadd
commit fbb28afb2f
3 changed files with 17 additions and 6 deletions

View File

@@ -1,11 +1,15 @@
from pathlib import Path
import pytest
from clan_cli.tests.helpers import cli
from clan_cli.tests.stdout import CaptureOutput
@pytest.mark.impure
def test_flash_list_languages(capture_output: CaptureOutput) -> None:
@pytest.mark.with_core
def test_flash_list_languages(
temporary_home: Path, capture_output: CaptureOutput
) -> None:
with capture_output as output:
cli.run(["flash", "list", "languages"])
assert "en_US.UTF-8" in output.out
@@ -14,8 +18,10 @@ def test_flash_list_languages(capture_output: CaptureOutput) -> None:
assert len(languages) > 1
@pytest.mark.impure
def test_flash_list_keymaps(capture_output: CaptureOutput) -> None:
@pytest.mark.with_core
def test_flash_list_keymaps(
temporary_home: Path, capture_output: CaptureOutput
) -> None:
with capture_output as output:
cli.run(["flash", "list", "keymaps"])
assert "us" in output.out