aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/QtMultimedia/audio_test.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/QtMultimedia/audio_test.py b/tests/QtMultimedia/audio_test.py
index f3aa680d5..773524ed2 100644
--- a/tests/QtMultimedia/audio_test.py
+++ b/tests/QtMultimedia/audio_test.py
@@ -9,13 +9,19 @@ from PySide.QtMultimedia import *
class testAudioDevices(unittest.TestCase):
def testListDevices(self):
+ valid = False
devices = QAudioDeviceInfo.availableDevices(QAudio.AudioOutput)
if not len(devices):
return
+ valid = True
for devInfo in devices:
if devInfo.deviceName() == 'null':
- continue
+ # skip the test if the only device found is a invalid device
+ if len(devices) == 1:
+ return
+ else:
+ continue
fmt = QAudioFormat()
for codec in devInfo.supportedCodecs():
fmt.setCodec(codec)