aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phonon/qobjectdescription_test.py
blob: 7312ee3528b26621f93813a6910f9dce710ab56c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import unittest

from PySide.QtCore import *
from PySide import phonon

from helper import UsesQCoreApplication

class CapabilitiesTest(UsesQCoreApplication):
    def testFromIndex(self):
        devices = phonon.Phonon.BackendCapabilities.availableAudioOutputDevices()
        for device in devices:
            self.assert_(isinstance(device, phonon.Phonon.AudioOutputDevice))
            other = phonon.Phonon.AudioOutputDevice.fromIndex(device.index())
            self.assertEqual(device.name(), other.name())
            self.assertEqual(device.index(), other.index())

if __name__ == '__main__':
    unittest.main()