~ubuntu-branches/ubuntu/utopic/pyside/utopic

« back to all changes in this revision

Viewing changes to tests/QtMultimedia/audio_test.py

  • Committer: Bazaar Package Importer
  • Author(s): Didier Raboud
  • Date: 2011-02-18 18:01:00 UTC
  • mfrom: (1.2.3 upstream) (6.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20110218180100-vaczjij7g08fzfme
Tags: 1.0.0~rc1-1
* New 1.0.0~rc1 upstream release
  - Bump the B-D chain versions:
    + apiextractor to 0.10.0-2~
    + generatorrunner to 0.6.6
    + shiboken to 1.0.0~rc1
* Update patches to ~rc1.
* debian/watch: update to handle Release Candidates too.
* Bump XS-Python-Version to >= 2.6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
class testAudioDevices(unittest.TestCase):
10
10
 
11
11
    def testListDevices(self):
12
 
        for devInfo in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
 
12
        valid = False
 
13
        devices = QAudioDeviceInfo.availableDevices(QAudio.AudioOutput)
 
14
        if not len(devices):
 
15
            return
 
16
 
 
17
        valid = True
 
18
        for devInfo in devices:
13
19
            if devInfo.deviceName() == 'null':
14
 
                continue
 
20
                # skip the test if the only device found is a invalid device
 
21
                if len(devices) == 1:
 
22
                    return
 
23
                else:
 
24
                    continue
15
25
            fmt = QAudioFormat()
16
26
            for codec in devInfo.supportedCodecs():
17
27
                fmt.setCodec(codec)