MIL-008: Choose level

Review record RC-041 (Go, autonomous mode, not independent).

Task: MIL-008#1
Task: MIL-008#2
Task: MIL-008#3
Task: MIL-008#4
Task: MIL-008#5
Task: MIL-008#6
Task: MIL-008#7
Task: MIL-008#8
This commit is contained in:
2026-10-14 23:58:31 +08:00
parent ee9c531ea6
commit f45d6036e4
40 changed files with 1483 additions and 102 deletions
+11 -3
View File
@@ -6,6 +6,7 @@ from pathlib import Path
import pytest
from flash_card.domain.value_objects.level import Level
from flash_card.infrastructure.speech.gtts_speech import GttsSpeech
from flash_card.infrastructure.speech.null_speech import NullSpeech
from flash_card.presentation import app
@@ -16,6 +17,11 @@ class _FakeRoot:
return None
class _FakeApplication:
root = _FakeRoot()
exit_code = 0
def _found(name: str) -> ModuleSpec:
return ModuleSpec(name, None)
@@ -58,10 +64,12 @@ def test_main_passes_speech_disabled_with_no_speech_option(
seen: list[bool] = []
def fake_create(
data_dir: Path | None = None, speech_enabled: bool = True
) -> tuple[_FakeRoot, object]:
data_dir: Path | None = None,
speech_enabled: bool = True,
level: Level | None = None,
) -> _FakeApplication:
seen.append(speech_enabled)
return _FakeRoot(), object()
return _FakeApplication()
monkeypatch.setattr(app, "create_application", fake_create)