1
0
mirror of https://github.com/darkzoul5/YoutubePlaylistSync.git synced 2026-07-03 04:23:59 +03:00

tests: fix changed module name

This commit is contained in:
2026-05-16 18:27:41 +03:00
parent 00e3f84f35
commit d232137e17
9 changed files with 23 additions and 27 deletions
+1 -3
View File
@@ -22,7 +22,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v5 uses: actions/setup-python@v5
@@ -38,8 +38,6 @@ jobs:
python -m pip install -e ".[test]" python -m pip install -e ".[test]"
- name: Run tests - name: Run tests
env:
PYTHONPATH: ${{ github.workspace }}
run: | run: |
set -euo pipefail set -euo pipefail
pytest -q pytest -q
+3 -3
View File
@@ -80,19 +80,19 @@ Queue / retry:
- Compute-only: - Compute-only:
```bash ```bash
python -m src.app.cli python -m app.cli
``` ```
- Apply actions: - Apply actions:
```bash ```bash
python -m src.app.cli --apply python -m app.cli --apply
``` ```
- Single playlist (0-based index): - Single playlist (0-based index):
```bash ```bash
python -m src.app.cli --apply --playlist 0 python -m app.cli --apply --playlist 0
``` ```
## Data & Layout ## Data & Layout
+1 -1
View File
@@ -1,6 +1,6 @@
from __future__ import annotations 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(): def test_build_format_defaults_to_best_mp4():
+5 -6
View File
@@ -4,11 +4,11 @@ import asyncio
import sys import sys
from pathlib import Path from pathlib import Path
from src.app.core.download.downloader import Downloader from app.core.download.downloader import Downloader
from src.app.core.download.queue_manager import DownloadJob from app.core.download.queue_manager import DownloadJob
from src.app.core.events.event_bus import EventBus from app.core.events.event_bus import EventBus
from src.app.core.models import PlaylistItem, SyncAction, SyncActionType from app.core.models import PlaylistItem, SyncAction, SyncActionType
from src.app.core.sync.executor import ActionExecutor from app.core.sync.executor import ActionExecutor
def test_executor_emits_sync_events(tmp_path): 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 callbacks
assert any("progress" in c for c in callbacks) assert any("progress" in c for c in callbacks)
+3 -3
View File
@@ -4,9 +4,9 @@ import os
import pytest import pytest
from src.app.core.database.db import Database from app.core.database.db import Database
from src.app.core.sync.executor import ActionExecutor from app.core.sync.executor import ActionExecutor
from src.app.core.sync.service import SyncService from app.core.sync.service import SyncService
PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL") PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL")
+3 -3
View File
@@ -4,9 +4,9 @@ import os
import pytest import pytest
from src.app.core.database.db import Database from app.core.database.db import Database
from src.app.core.sync.executor import ActionExecutor from app.core.sync.executor import ActionExecutor
from src.app.core.sync.service import SyncService from app.core.sync.service import SyncService
PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL") PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL")
+3 -3
View File
@@ -4,9 +4,9 @@ import os
import pytest import pytest
from src.app.core.database.db import Database from app.core.database.db import Database
from src.app.core.sync.executor import ActionExecutor from app.core.sync.executor import ActionExecutor
from src.app.core.sync.service import SyncService from app.core.sync.service import SyncService
PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL") PLAYLIST_URL = os.getenv("TEST_PLAYLIST_URL")
+3 -4
View File
@@ -2,9 +2,9 @@ from __future__ import annotations
from pathlib import Path from pathlib import Path
from src.app.core.models import PlaylistItem, SyncAction, SyncActionType from app.core.models import PlaylistItem, SyncAction, SyncActionType
from src.app.core.sync.executor import ActionExecutor from app.core.sync.executor import ActionExecutor
from src.app.core.sync.reorder import safe_multi_rename from app.core.sync.reorder import safe_multi_rename
def test_safe_multi_rename_swaps_files(tmp_path: Path): 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() assert not victim.exists()
recycled = save_root / ".recycle" / "audio" / victim.name recycled = save_root / ".recycle" / "audio" / victim.name
assert recycled.exists() assert recycled.exists()
+1 -1
View File
@@ -3,7 +3,7 @@ from __future__ import annotations
import json import json
import os 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): def test_settings_creates_root_config_if_missing(tmp_path, monkeypatch):