aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phonon
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2010-06-17 16:07:15 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2010-06-17 16:17:16 -0300
commite34105a7499fe1c2edd6fbee6dc2acb3993f5827 (patch)
treec5aee36853a481299515ae27c72c046a312cc0fc /tests/phonon
parent6b70a1362ccfd140617c610e52f2abbbbe08afc4 (diff)
Fix phonon test
Now it checks for ogg backend before playing. The timeout was moved to 10s to avoid phonon timeout. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Araújo <renato.araujo@openbossa.org>
Diffstat (limited to 'tests/phonon')
-rw-r--r--tests/phonon/basic_playing_test.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/phonon/basic_playing_test.py b/tests/phonon/basic_playing_test.py
index fe295e898..45f6c127b 100644
--- a/tests/phonon/basic_playing_test.py
+++ b/tests/phonon/basic_playing_test.py
@@ -54,13 +54,17 @@ class TestSimplePlaying(UsesQCoreApplication):
self.called = True
def testStateChanged(self):
- QtCore.QObject.connect(self.media,
+ # Check for ogg support before playing it
+ if (phonon.Phonon.BackendCapabilities.isMimeTypeAvailable('audio/ogg')):
+ QtCore.QObject.connect(self.media,
QtCore.SIGNAL('stateChanged(Phonon::State, Phonon::State)'),
self.state_cb)
- self.media.play()
- self.app.exec_()
- self.assert_(self.called)
+ self.media.play()
+ self.app.exec_()
+ self.assert_(self.called)
+ else:
+ print 'Ogg format not supported! Playback test skipped!'
if __name__ == '__main__':
unittest.main()