1234567891011121314151617181920212223242526272829303132333435363738394041 |
- 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_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
|