summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-12-17 19:01:37 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:47:59 -0300
commit4204a86b97c3ea37f284fc5a922ea8aa696f3ddc (patch)
tree6b92b7fe0d1514133031f62ac89f3da8baf59aaf
parent914398bbf3aad4b933b827b716c36377aa00f270 (diff)
Fix QtMultimedia test to not fail when no devices were found.ps-1.0.0-beta2
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--tests/QtMultimedia/audio_test.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/QtMultimedia/audio_test.py b/tests/QtMultimedia/audio_test.py
index 0d8813d5..f3aa680d 100644
--- a/tests/QtMultimedia/audio_test.py
+++ b/tests/QtMultimedia/audio_test.py
@@ -9,7 +9,11 @@ from PySide.QtMultimedia import *
class testAudioDevices(unittest.TestCase):
def testListDevices(self):
- for devInfo in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
+ devices = QAudioDeviceInfo.availableDevices(QAudio.AudioOutput)
+ if not len(devices):
+ return
+
+ for devInfo in devices:
if devInfo.deviceName() == 'null':
continue
fmt = QAudioFormat()