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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user