From d3b630e1682c89ee427964d81c32219c14863b1d Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 22 Dec 2010 10:25:32 -0300 Subject: Fix the QtMultimedia/audio_test.py to accept computers with only null device. --- tests/QtMultimedia/audio_test.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') 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) -- cgit v1.2.3