Add comment in pytest conftest
This commit is contained in:
parent
8b7d6f8a7e
commit
bafa6fc6d8
|
@ -1,6 +1,6 @@
|
|||
import os
|
||||
import shutil
|
||||
import tempfile
|
||||
from tempfile import TemporaryDirectory
|
||||
|
||||
import pytest
|
||||
|
||||
|
@ -8,15 +8,17 @@ AUDIO_FILE = "tests/test_data/44100Hz-16bit-mono.mp3"
|
|||
AUDIO_FILENAME = os.path.basename(AUDIO_FILE)
|
||||
AUDIO_IMPORT_DEST = "Test Artist/Test Album/44100Hz-16bit-mono.mp3"
|
||||
|
||||
# TODO: Use pathlib for file manipulation
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def dest_dir():
|
||||
with tempfile.TemporaryDirectory(prefix="dest") as tmpdir:
|
||||
with TemporaryDirectory(prefix="dest") as tmpdir:
|
||||
yield tmpdir
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def src_dir():
|
||||
with tempfile.TemporaryDirectory(prefix="src") as tmpdir:
|
||||
with TemporaryDirectory(prefix="src") as tmpdir:
|
||||
shutil.copy(AUDIO_FILE, tmpdir)
|
||||
yield tmpdir
|
||||
|
|
Loading…
Reference in New Issue