aboutsummaryrefslogtreecommitdiffstats
path: root/tests
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
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')
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/phonon/basic_playing_test.py12
2 files changed, 9 insertions, 5 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 7938ea7a..c1a03764 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(PYSIDE_TIMEOUT 5)
+set(PYSIDE_TIMEOUT 10)
macro(TEST_QT_MODULE var name)
if(NOT DISABLE_${name} AND ${var})
diff --git a/tests/phonon/basic_playing_test.py b/tests/phonon/basic_playing_test.py
index fe295e89..45f6c127 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()