diff options
author | Renato Araujo Oliveira Filho <renato.filho@openbossa.org> | 2010-12-22 10:25:32 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:48:02 -0300 |
commit | d3b630e1682c89ee427964d81c32219c14863b1d (patch) | |
tree | 86842fd5e65b061d9283f37a8fbb23af72dd52e2 | |
parent | cebdd1f4dcb057436878b60295684c24cb09f1d9 (diff) |
Fix the QtMultimedia/audio_test.py to accept computers with only null
device.
-rw-r--r-- | tests/QtMultimedia/audio_test.py | 8 |
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) |