summaryrefslogtreecommitdiffstats
path: root/tests/QtMultimedia
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-06-07 14:43:45 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-06-07 16:57:11 -0300
commitab918abc1e103e0ca86939f7d057e8a44ac8a4ef (patch)
tree53c6f57d089dcf5e145d766b1ceef704714046d8 /tests/QtMultimedia
parent471486732b03cbb42b884158604a59d5a18e8a35 (diff)
downloadpyside-ab918abc1e103e0ca86939f7d057e8a44ac8a4ef.tar.gz
pyside-ab918abc1e103e0ca86939f7d057e8a44ac8a4ef.tar.xz
pyside-ab918abc1e103e0ca86939f7d057e8a44ac8a4ef.zip
Created new unittest model.
Separete unittest for module. Only run unittest for compiled modules. Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>, Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtMultimedia')
-rw-r--r--tests/QtMultimedia/CMakeLists.txt1
-rw-r--r--tests/QtMultimedia/audio_test.py32
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/QtMultimedia/CMakeLists.txt b/tests/QtMultimedia/CMakeLists.txt
new file mode 100644
index 0000000..62150eb
--- /dev/null
+++ b/tests/QtMultimedia/CMakeLists.txt
@@ -0,0 +1 @@
+PYSIDE_TEST(audio_test.py)
diff --git a/tests/QtMultimedia/audio_test.py b/tests/QtMultimedia/audio_test.py
new file mode 100644
index 0000000..04d0a1e
--- /dev/null
+++ b/tests/QtMultimedia/audio_test.py
@@ -0,0 +1,32 @@
+
+'''Test cases for QHttp'''
+
+import unittest
+
+from PySide.QtCore import *
+from PySide.QtMultimedia import *
+
+class testAudioDevices(unittest.TestCase):
+
+ def testListDevices(self):
+ for devInfo in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
+ fmt = QAudioFormat()
+ for codec in devInfo.supportedCodecs():
+ fmt.setCodec(codec)
+ for frequency in devInfo.supportedFrequencies():
+ fmt.setFrequency(frequency)
+ for channels in devInfo.supportedChannels():
+ fmt.setChannels(channels)
+ for sampleType in devInfo.supportedSampleTypes():
+ fmt.setSampleType(sampleType)
+ for sampleSize in devInfo.supportedSampleSizes():
+ fmt.setSampleSize(sampleSize)
+ for endian in devInfo.supportedByteOrders():
+ fmt.setByteOrder(endian)
+ if devInfo.isFormatSupported(fmt):
+ return
+ self.assert_(False)
+
+
+if __name__ == '__main__':
+ unittest.main()