diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-01-05 19:11:53 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:51:44 -0300 |
commit | adb9268807aca51c9332e266d6649005c5e9577f (patch) | |
tree | 33d807c947864738f2723cbdf98961de2840b8f9 /tests | |
parent | e4eaf410aff780efc4e7f5bc693a7b031938d1c5 (diff) |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/phonon/basic_playing_test.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/phonon/basic_playing_test.py b/tests/phonon/basic_playing_test.py index 45f6c127b..4eb2ccdd7 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) |