2021-05-29 17:48:35 +02:00
|
|
|
import shutil
|
2022-02-15 12:01:40 +01:00
|
|
|
from pathlib import Path
|
2021-06-04 14:06:02 +02:00
|
|
|
|
|
|
|
import pytest
|
2023-02-26 01:27:00 +01:00
|
|
|
from libretime_shared.logging import setup_logger
|
2021-05-29 17:48:35 +02:00
|
|
|
|
2021-08-30 21:23:48 +02:00
|
|
|
from .fixtures import fixtures_path
|
|
|
|
|
2023-02-26 01:27:00 +01:00
|
|
|
setup_logger("debug")
|
2022-02-15 10:33:17 +01:00
|
|
|
|
2021-08-30 21:23:48 +02:00
|
|
|
AUDIO_FILENAME = "s1-stereo-tagged.mp3"
|
|
|
|
AUDIO_FILE = fixtures_path / AUDIO_FILENAME
|
|
|
|
AUDIO_IMPORT_DEST = f"Test Artist/Test Album/{AUDIO_FILENAME}"
|
2021-05-29 17:48:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture()
|
2022-02-15 12:01:40 +01:00
|
|
|
def dest_dir(tmp_path: Path):
|
|
|
|
dest = tmp_path / "dest"
|
|
|
|
dest.mkdir()
|
|
|
|
yield dest
|
2021-05-29 17:48:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture()
|
2022-02-15 12:01:40 +01:00
|
|
|
def src_dir(tmp_path: Path):
|
|
|
|
src = tmp_path / "src"
|
|
|
|
src.mkdir()
|
|
|
|
shutil.copy(AUDIO_FILE, src)
|
|
|
|
yield src
|