aboutsummaryrefslogtreecommitdiffstats
path: root/solo-tool-project/test/fixtures.py
blob: 3306388c0ef625444ece53a5cdcb1f3a18f7c602 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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):
    path = tmp_path / "songs"
    os.mkdir(path)
    return path

@pytest.fixture
def sessionPath(tmp_path):
    path = tmp_path / "sessions"
    os.mkdir(path)
    return path

@pytest.fixture
def soloTool(mockPlayer):
    return SoloTool(player=mockPlayer)

@pytest.fixture
def testSongs(songPool):
    songs = [
        songPool / "test.flac",
        songPool / "test.mp3",
        songPool / "test.mp4"
    ]

    for song in songs:
        song.touch()
    return songs