diff options
-rw-r--r-- | solo_tool_integrationtest.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/solo_tool_integrationtest.py b/solo_tool_integrationtest.py index b9ce62e..d0123d5 100644 --- a/solo_tool_integrationtest.py +++ b/solo_tool_integrationtest.py @@ -13,8 +13,8 @@ def mockPlayer(): def uut(mockPlayer): return SoloTool(mockPlayer) -@pytest.fixture(autouse=True) -def copyTestFiles(tmp_path): +@pytest.fixture +def prepared_tmp_path(tmp_path): testFiles = [ "test.flac", "test.mp3", @@ -23,6 +23,8 @@ def copyTestFiles(tmp_path): for f in testFiles: shutil.copy(pathlib.Path(f), tmp_path) + return tmp_path + def test_playerControls(uut, mockPlayer): assert mockPlayer.state == MockPlayer.STOPPED assert uut.isPlaying() == False @@ -204,12 +206,12 @@ def test_storeAbLimitsWithoutSong(uut, mockPlayer): uut.tick() assert mockPlayer.position == abLimit[0] -def test_loadAndSaveSession(tmp_path): +def test_loadAndSaveSession(prepared_tmp_path): mockPlayer = MockPlayer() uut = SoloTool(mockPlayer) - loadedSessionFile = tmp_path / "test_session.json" - savedSessionFile = tmp_path / "test_session_save.json" + loadedSessionFile = prepared_tmp_path / "test_session.json" + savedSessionFile = prepared_tmp_path / "test_session_save.json" uut.loadSession(loadedSessionFile) uut.saveSession(savedSessionFile) |