chore: route generated test artifacts to ignored temp roots

This commit is contained in:
Ilgiz Kalmetyev 2026-04-09 15:21:58 +05:00
parent 9e0a75fb73
commit 333e0a433e
17 changed files with 23 additions and 17 deletions

8
.gitignore vendored
View File

@ -19,4 +19,10 @@ htmlcov/
Thumbs.db
Desktop.ini
.DS_Store
.tmp/
/tests/unit/*/
/tests/integration/*/
/tests/manual/*/
pytest-cache-files-*/
tmp*/
packaging/ctranslate2/out/

View File

@ -34,7 +34,7 @@ from injection.text_injector import TextInjector
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "integration" / name
root = Path.cwd() / ".tmp" / "tests" / "integration" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -16,7 +16,7 @@ from audio.capture_service import (
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -26,7 +26,7 @@ from core.config_service import (
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -20,7 +20,7 @@ from logging_ext.logging_service import LoggingService
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -17,7 +17,7 @@ from ui.history_dialog import HistoryDialog
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -13,7 +13,7 @@ from history.history_store import HistoryStore
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -21,7 +21,7 @@ from history.history_store import (
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -15,7 +15,7 @@ from logging_ext.logging_service import LoggingService
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -20,7 +20,7 @@ from ui.model_download_worker import ModelDownloadWorker
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -21,7 +21,7 @@ from asr.model_registry import ModelDefinition
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -12,7 +12,7 @@ from core.model_fallback_service import ModelFallbackError, ModelFallbackOutcome
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -15,7 +15,7 @@ from core.dependency_probe import DependencyProbeResult
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -10,7 +10,7 @@ from asr.model_registry import ModelRegistry
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -14,7 +14,7 @@ from core.runtime_info import RuntimeInfoService
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -19,7 +19,7 @@ from ui.runtime_status_controller import RuntimeStatusController
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try:

View File

@ -16,7 +16,7 @@ from asr.transcription_worker import TranscriptionError, TranscriptionResult, Tr
@contextmanager
def workspace_root(name: str):
root = Path.cwd() / "tests" / "unit" / name
root = Path.cwd() / ".tmp" / "tests" / "unit" / name
shutil.rmtree(root, ignore_errors=True)
root.mkdir(parents=True, exist_ok=True)
try: