libretime/analyzer/tests/conftest.py

29 lines
562 B
Python
Raw Permalink Normal View History

2021-05-29 17:48:35 +02:00
import shutil
from pathlib import Path
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")
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()
def dest_dir(tmp_path: Path):
dest = tmp_path / "dest"
dest.mkdir()
yield dest
2021-05-29 17:48:35 +02:00
@pytest.fixture()
def src_dir(tmp_path: Path):
src = tmp_path / "src"
src.mkdir()
shutil.copy(AUDIO_FILE, src)
yield src