From d232137e174378dce1aa7a973dff9230d5fb036a Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Sat, 16 May 2026 18:27:41 +0300 Subject: [PATCH] tests: fix changed module name --- .github/workflows/unit-tests.yml | 4 +--- README.md | 6 +++--- tests/test_download_quality_format.py | 2 +- tests/test_event_surface.py | 11 +++++------ tests/test_integration_audio.py | 6 +++--- tests/test_integration_both.py | 6 +++--- tests/test_integration_video.py | 6 +++--- tests/test_reorder_and_delete.py | 7 +++---- tests/test_settings_default_config.py | 2 +- 9 files changed, 23 insertions(+), 27 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index aa4b706..ab713cd 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 @@ -38,8 +38,6 @@ jobs: python -m pip install -e ".[test]" - name: Run tests - env: - PYTHONPATH: ${{ github.workspace }} run: | set -euo pipefail pytest -q diff --git a/README.md b/README.md index 037214d..9ce9a16 100644 --- a/README.md +++ b/README.md @@ -80,19 +80,19 @@ Queue / retry: - Compute-only: ```bash -python -m src.app.cli +python -m app.cli ``` - Apply actions: ```bash -python -m src.app.cli --apply +python -m app.cli --apply ``` - Single playlist (0-based index): ```bash -python -m src.app.cli --apply --playlist 0 +python -m app.cli --apply --playlist 0 ``` ## Data & Layout diff --git a/tests/test_download_quality_format.py b/tests/test_download_quality_format.py index 39f17df..a4b8a05 100644 --- a/tests/test_download_quality_format.py +++ b/tests/test_download_quality_format.py @@ -1,6 +1,6 @@ from __future__ import annotations -from src.app.core.download.downloader import Downloader +from app.core.download.downloader import Downloader def test_build_format_defaults_to_best_mp4(): diff --git a/tests/test_event_surface.py b/tests/test_event_surface.py index 666cb56..ec99dd6 100644 --- a/tests/test_event_surface.py +++ b/tests/test_event_surface.py @@ -4,11 +4,11 @@ import asyncio import sys from pathlib import Path -from src.app.core.download.downloader import Downloader -from src.app.core.download.queue_manager import DownloadJob -from src.app.core.events.event_bus import EventBus -from src.app.core.models import PlaylistItem, SyncAction, SyncActionType -from src.app.core.sync.executor import ActionExecutor +from app.core.download.downloader import Downloader +from app.core.download.queue_manager import DownloadJob +from app.core.events.event_bus import EventBus +from app.core.models import PlaylistItem, SyncAction, SyncActionType +from app.core.sync.executor import ActionExecutor def test_executor_emits_sync_events(tmp_path): @@ -82,4 +82,3 @@ def test_downloader_progress_hook_calls_callback(tmp_path, monkeypatch): assert callbacks assert any("progress" in c for c in callbacks) - diff --git a/tests/test_integration_audio.py b/tests/test_integration_audio.py index 1865ec4..5572a6d 100644 --- a/tests/test_integration_audio.py +++ b/tests/test_integration_audio.py @@ -4,9 +4,9 @@ import os import pytest -from src.app.core.database.db import Database -from src.app.core.sync.executor import ActionExecutor -from src.app.core.sync.service import SyncService +from app.core.database.db import Database +from app.core.sync.executor import ActionExecutor +from app.core.sync.service import SyncService PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL") diff --git a/tests/test_integration_both.py b/tests/test_integration_both.py index d126e9a..ec4ca42 100644 --- a/tests/test_integration_both.py +++ b/tests/test_integration_both.py @@ -4,9 +4,9 @@ import os import pytest -from src.app.core.database.db import Database -from src.app.core.sync.executor import ActionExecutor -from src.app.core.sync.service import SyncService +from app.core.database.db import Database +from app.core.sync.executor import ActionExecutor +from app.core.sync.service import SyncService PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL") diff --git a/tests/test_integration_video.py b/tests/test_integration_video.py index 0a95dff..d372dc4 100644 --- a/tests/test_integration_video.py +++ b/tests/test_integration_video.py @@ -4,9 +4,9 @@ import os import pytest -from src.app.core.database.db import Database -from src.app.core.sync.executor import ActionExecutor -from src.app.core.sync.service import SyncService +from app.core.database.db import Database +from app.core.sync.executor import ActionExecutor +from app.core.sync.service import SyncService PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL") diff --git a/tests/test_reorder_and_delete.py b/tests/test_reorder_and_delete.py index bf0a124..c7d5037 100644 --- a/tests/test_reorder_and_delete.py +++ b/tests/test_reorder_and_delete.py @@ -2,9 +2,9 @@ from __future__ import annotations from pathlib import Path -from src.app.core.models import PlaylistItem, SyncAction, SyncActionType -from src.app.core.sync.executor import ActionExecutor -from src.app.core.sync.reorder import safe_multi_rename +from app.core.models import PlaylistItem, SyncAction, SyncActionType +from app.core.sync.executor import ActionExecutor +from app.core.sync.reorder import safe_multi_rename def test_safe_multi_rename_swaps_files(tmp_path: Path): @@ -43,4 +43,3 @@ def test_executor_deletes_to_recycle(tmp_path: Path): assert not victim.exists() recycled = save_root / ".recycle" / "audio" / victim.name assert recycled.exists() - diff --git a/tests/test_settings_default_config.py b/tests/test_settings_default_config.py index 23fa430..b8bab9a 100644 --- a/tests/test_settings_default_config.py +++ b/tests/test_settings_default_config.py @@ -3,7 +3,7 @@ from __future__ import annotations import json import os -from src.app.config.settings import Settings +from app.config.settings import Settings def test_settings_creates_root_config_if_missing(tmp_path, monkeypatch):