Only try to play the ogg file if the system has the capability to do it.
This fix a failing test on macosx.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
This commit is contained in:
parent
53e649629b
commit
753d2bd1f6
1 changed files with 7 additions and 3 deletions
|
|
@ -38,9 +38,13 @@ class TestSimplePlaying(UsesQCoreApplication):
|
||||||
del self.source
|
del self.source
|
||||||
|
|
||||||
def testFinishedSignal(self):
|
def testFinishedSignal(self):
|
||||||
# Should pass if finished() is called
|
# Check for ogg support before playing it
|
||||||
self.media.play()
|
if (phonon.Phonon.BackendCapabilities.isMimeTypeAvailable('audio/ogg')):
|
||||||
self.app.exec_()
|
# Should pass if finished() is called
|
||||||
|
self.media.play()
|
||||||
|
self.app.exec_()
|
||||||
|
else:
|
||||||
|
print 'Ogg format not supported! Playback test skipped!'
|
||||||
|
|
||||||
def testMediaSource(self):
|
def testMediaSource(self):
|
||||||
self.assertEqual(self.media.currentSource(), self.source)
|
self.assertEqual(self.media.currentSource(), self.source)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue