summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-05 19:11:53 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2011-01-05 19:26:45 -0200
commit753d2bd1f63e29f2a6b812a157200a05e6c06cec (patch)
tree635c814e1498b41b401c25313b966f50d1ae093a
parent53e649629bb0d36cb47bd50e8428ba6e174efa2d (diff)
downloadpyside-753d2bd1f63e29f2a6b812a157200a05e6c06cec.tar.gz
pyside-753d2bd1f63e29f2a6b812a157200a05e6c06cec.tar.xz
pyside-753d2bd1f63e29f2a6b812a157200a05e6c06cec.zip
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>
-rw-r--r--tests/phonon/basic_playing_test.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/phonon/basic_playing_test.py b/tests/phonon/basic_playing_test.py
index 45f6c12..4eb2ccd 100644
--- a/tests/phonon/basic_playing_test.py
+++ b/tests/phonon/basic_playing_test.py
@@ -38,9 +38,13 @@ class TestSimplePlaying(UsesQCoreApplication):
del self.source
def testFinishedSignal(self):
- # Should pass if finished() is called
- self.media.play()
- self.app.exec_()
+ # Check for ogg support before playing it
+ if (phonon.Phonon.BackendCapabilities.isMimeTypeAvailable('audio/ogg')):
+ # Should pass if finished() is called
+ self.media.play()
+ self.app.exec_()
+ else:
+ print 'Ogg format not supported! Playback test skipped!'
def testMediaSource(self):
self.assertEqual(self.media.currentSource(), self.source)