diff options
Diffstat (limited to 'solo-tool-project/test/fixtures.py')
-rw-r--r-- | solo-tool-project/test/fixtures.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/solo-tool-project/test/fixtures.py b/solo-tool-project/test/fixtures.py new file mode 100644 index 0000000..f70901b --- /dev/null +++ b/solo-tool-project/test/fixtures.py @@ -0,0 +1,32 @@ +import pytest +from pathlib import Path +import os + +from solo_tool.solo_tool import SoloTool +from player_mock import Player as MockPlayer + +@pytest.fixture +def mockPlayer(): + return MockPlayer() + +@pytest.fixture +def songPool(tmp_path): + return tmp_path / "songs" + +@pytest.fixture +def soloTool(mockPlayer, songPool): + return SoloTool(songPool, player=mockPlayer) + +@pytest.fixture +def testSongs(songPool): + songs = [ + songPool / "test.flac", + songPool / "test.mp3", + songPool / "test.mp4" + ] + + os.mkdir(songPool) + for song in songs: + song.touch() + return songs + |