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>2010-12-17 19:16:56 -0200
commit8545117cff205d6664e6f3ddddd43dd9cb23cf60 (patch)
tree4d7e8eb728b0d47f55abf77c24c09ef6a902cc58
parentc634b05def6265f8fa9ef65e17449ec7abf5e2b6 (diff)
downloadpyside-1.0.0-beta2.tar.gz
pyside-1.0.0-beta2.tar.xz
pyside-1.0.0-beta2.zip
Fix QtMultimedia test to not fail when no devices were found.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 0d8813d..f3aa680 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()