voice-dictation/tests/conftest.py
Claude Zhenya b96b49f1d5 v0.2.0: режимы обработки, кастомные стили, новая иконка, прослушка звуков
- Реестр режимов постобработки вместо бинарного summary_mode:
  Чистая диктовка, Чистовик (без паразитов), Summary, Переводчик RU→EN,
  Промпт для LLM, Буллеты, Деловое письмо
- Кастомные стили: свои промпты в настройках (таб «Стили»)
- Новая иконка приложения (микрофон + VД)
- Прослушка звуков в настройках (кнопки ▶)
- ffmpeg как опциональная докачка (кнопка в настройках), WAV-fallback без него
- Версия 0.2.0 + changelog в «О программе»
- Фикс: сохранение настроек через dataclasses.replace (не теряет поля)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 22:48:38 +03:00

33 lines
891 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""Общие фикстуры pytest."""
from __future__ import annotations
import pytest
from voice_dictation.core.paths import AppPaths
@pytest.fixture()
def tmp_paths(tmp_path: pytest.TempPathFactory) -> AppPaths:
"""AppPaths с временными директориями в pytest tmp_path.
Args:
tmp_path: Встроенная фикстура pytest.
Returns:
AppPaths с путями в tmp_path.
"""
root = tmp_path # type: ignore[arg-type]
paths = AppPaths(
root=root,
config_file=root / "config.json",
usage_db=root / "usage.db",
dictionary_file=root / "dictionary.txt",
custom_sounds_dir=root / "sounds",
log_file=root / "app.log",
pid_file=root / "dictate.pid",
tmp_dir=root / "tmp",
bin_dir=root / "bin",
)
paths.ensure_exists()
return paths