123456789101112131415161718192021222324252627282930313233343536373839 |
- import os
- import shutil
- import pytest
- # pylint: disable=redefined-outer-name
- @pytest.fixture
- def tracks_dir_path():
- return os.path.join(os.path.dirname(__file__), "tracks")
- @pytest.fixture
- def empty_id3_path(tmpdir, tracks_dir_path):
- path = tmpdir.join("empty.mp3").strpath
- shutil.copyfile(src=os.path.join(tracks_dir_path, "id3v2.4-empty.mp3"), dst=path)
- return path
- @pytest.fixture
- def empty_mp4_path(tmpdir, tracks_dir_path):
- path = tmpdir.join("empty.m4a").strpath
- shutil.copyfile(src=os.path.join(tracks_dir_path, "mp4-aac-empty.m4a"), dst=path)
- return path
- @pytest.fixture
- def empty_ogg_opus_path(tmpdir, tracks_dir_path):
- path = tmpdir.join("empty.opus").strpath
- shutil.copyfile(src=os.path.join(tracks_dir_path, "ogg-opus-empty.opus"), dst=path)
- return path
- @pytest.fixture
- def empty_ogg_vorbis_path(tmpdir, tracks_dir_path):
- path = tmpdir.join("empty.ogg").strpath
- shutil.copyfile(src=os.path.join(tracks_dir_path, "ogg-vorbis-empty.ogg"), dst=path)
- return path
|