audio: Test setting of volume with mixer volume max below 100
This commit is contained in:
parent
2b96c70ab1
commit
6a5ceeec50
@ -4,6 +4,8 @@ import pygst
|
|||||||
pygst.require('0.10')
|
pygst.require('0.10')
|
||||||
import gst
|
import gst
|
||||||
|
|
||||||
|
import pykka
|
||||||
|
|
||||||
from mopidy import audio, settings
|
from mopidy import audio, settings
|
||||||
from mopidy.utils.path import path_to_uri
|
from mopidy.utils.path import path_to_uri
|
||||||
|
|
||||||
@ -18,7 +20,7 @@ class AudioTest(unittest.TestCase):
|
|||||||
self.audio = audio.Audio.start().proxy()
|
self.audio = audio.Audio.start().proxy()
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
self.audio.stop()
|
pykka.ActorRegistry.stop_all()
|
||||||
settings.runtime.clear()
|
settings.runtime.clear()
|
||||||
|
|
||||||
def prepare_uri(self, uri):
|
def prepare_uri(self, uri):
|
||||||
@ -56,6 +58,14 @@ class AudioTest(unittest.TestCase):
|
|||||||
self.assertTrue(self.audio.set_volume(value).get())
|
self.assertTrue(self.audio.set_volume(value).get())
|
||||||
self.assertEqual(value, self.audio.get_volume().get())
|
self.assertEqual(value, self.audio.get_volume().get())
|
||||||
|
|
||||||
|
def test_set_volume_with_mixer_max_below_100(self):
|
||||||
|
settings.MIXER = 'fakemixer track_max_volume=40'
|
||||||
|
self.audio = audio.Audio.start().proxy()
|
||||||
|
|
||||||
|
for value in range(0, 101):
|
||||||
|
self.assertTrue(self.audio.set_volume(value).get())
|
||||||
|
self.assertEqual(value, self.audio.get_volume().get())
|
||||||
|
|
||||||
@unittest.SkipTest
|
@unittest.SkipTest
|
||||||
def test_set_state_encapsulation(self):
|
def test_set_state_encapsulation(self):
|
||||||
pass # TODO
|
pass # TODO
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user