Add test_time_position_when_stopped
This commit is contained in:
parent
a01810619c
commit
5fc47b8611
@ -167,5 +167,9 @@ class BasePlaybackController(object):
|
||||
def volume(self):
|
||||
return self._volume
|
||||
|
||||
@property
|
||||
def time_position(self):
|
||||
raise NotImplementedError
|
||||
|
||||
def destroy(self):
|
||||
pass
|
||||
|
||||
@ -92,6 +92,10 @@ class GStreamerPlaybackController(BasePlaybackController):
|
||||
def volume(self, value):
|
||||
return self.bin.set_property('volume', float(value) / 100)
|
||||
|
||||
@property
|
||||
def time_position(self):
|
||||
return 0
|
||||
|
||||
def destroy(self):
|
||||
self.bin.set_state(gst.STATE_NULL)
|
||||
del self.bin
|
||||
|
||||
@ -553,7 +553,11 @@ class BasePlaybackControllerTest(object):
|
||||
raise NotImplementedError # design decision needed
|
||||
|
||||
def test_time_position_when_stopped(self):
|
||||
raise NotImplementedError
|
||||
self.assertEqual(self.playback.time_position, 0)
|
||||
|
||||
@populate_playlist
|
||||
def test_time_position_when_stopped_with_playlist(self):
|
||||
self.assertEqual(self.playback.time_position, 0)
|
||||
|
||||
def test_time_position_when_playing(self):
|
||||
raise NotImplementedError
|
||||
|
||||
Loading…
Reference in New Issue
Block a user