diff options
author | Eddy Pedroni <eddy@0xf7.com> | 2021-12-29 10:44:01 +0100 |
---|---|---|
committer | Eddy Pedroni <eddy@0xf7.com> | 2021-12-29 10:44:01 +0100 |
commit | 4474abcfbaf0bbc39de68dae2f8572e271b775bc (patch) | |
tree | cc311c573c75e5d69439f19f11aa1320f264d26d /solo_tool_integrationtest.py | |
parent | e44d87a86bd57664e14991257a1a70f1d4f5ba0b (diff) |
Refactored players, moved player mock to separate file
Diffstat (limited to 'solo_tool_integrationtest.py')
-rw-r--r-- | solo_tool_integrationtest.py | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/solo_tool_integrationtest.py b/solo_tool_integrationtest.py index cd635d4..a927bfb 100644 --- a/solo_tool_integrationtest.py +++ b/solo_tool_integrationtest.py @@ -1,49 +1,8 @@ from solo_tool import SoloTool +from player_mock import Player as MockPlayer import pathlib import shutil -class MockPlayer(): - STOPPED = 0 - PLAYING = 1 - PAUSED = 2 - - def __init__(self): - self.state = MockPlayer.STOPPED - self.rate = 1.0 - self.position = 0.0 - self.volume = 1.0 - self.currentSong = None - - def play(self): - self.state = MockPlayer.PLAYING - - def stop(self): - self.state = MockPlayer.STOPPED - - def pause(self): - self.state = MockPlayer.PAUSED - - def setPlaybackRate(self, rate): - self.rate = rate - - def getPlaybackRate(self): - return self.rate - - def setPlaybackPosition(self, position): - self.position = position - - def getPlaybackPosition(self): - return self.position - - def setPlaybackVolume(self, volume): - self.volume = volume - - def getPlaybackVolume(self): - return self.volume - - def setCurrentSong(self, path): - self.currentSong = path - def test_playerControls(): mockPlayer = MockPlayer() uut = SoloTool(mockPlayer) |