22 lines
702 B
Python
22 lines
702 B
Python
import pytest
|
|
|
|
from mka.application.meeting_service import ProcessingOptions
|
|
from mka.application.performance import PERFORMANCE_PROFILES, resolve_ollama_num_thread
|
|
|
|
|
|
def test_default_profile_is_auto() -> None:
|
|
assert ProcessingOptions().performance_profile == "auto"
|
|
assert PERFORMANCE_PROFILES[0] == "auto"
|
|
|
|
|
|
def test_auto_profile_has_no_ollama_thread_override() -> None:
|
|
assert resolve_ollama_num_thread("auto") is None
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
("profile", "threads"),
|
|
[("fast", 16), ("efficient", 10), ("powersave", 4)],
|
|
)
|
|
def test_profiles_resolve_to_current_ollama_thread_counts(profile: str, threads: int) -> None:
|
|
assert resolve_ollama_num_thread(profile) == threads
|