1. Ronald Oussoren
  2. pyobjc

Source

pyobjc / pyobjc-framework-QTKit / PyObjCTest / test_qtcaptureconnection.py


from PyObjCTools.TestSupport import *
from QTKit import *

try:
    unicode
except NameError:
    unicode = str

class TestQTCaptureConnection (TestCase):
    @min_os_level('10.5')
    def testConstants(self):
        self.assertIsInstance(QTCaptureConnectionFormatDescriptionWillChangeNotification, unicode)
        self.assertIsInstance(QTCaptureConnectionFormatDescriptionDidChangeNotification, unicode)
        self.assertIsInstance(QTCaptureConnectionAttributeWillChangeNotification, unicode)
        self.assertIsInstance(QTCaptureConnectionAttributeDidChangeNotification, unicode)
        self.assertIsInstance(QTCaptureConnectionChangedAttributeKey, unicode)
        self.assertIsInstance(QTCaptureConnectionAudioAveragePowerLevelsAttribute, unicode)
        self.assertIsInstance(QTCaptureConnectionAudioPeakHoldLevelsAttribute, unicode)
        self.assertIsInstance(QTCaptureConnectionAudioMasterVolumeAttribute, unicode)
        self.assertIsInstance(QTCaptureConnectionAudioVolumesAttribute, unicode)
        self.assertIsInstance(QTCaptureConnectionEnabledAudioChannelsAttribute, unicode)

    def testMethods(self):
        self.assertResultIsBOOL(QTCaptureConnection.isEnabled)
        self.assertArgIsBOOL(QTCaptureConnection.setEnabled_, 0)
        self.assertResultIsBOOL(QTCaptureConnection.attributeIsReadOnly_)


if __name__ == "__main__":
    main()