summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()