Exemplo n.º 1
0
 def test_get_string(self):
     extnames = (("ALC_ENUMERATION_EXT", alc.ALC_DEVICE_SPECIFIER),
                 ("ALC_ENUMERATE_ALL_EXT", alc.ALC_ALL_DEVICES_SPECIFIER)
                 )
     for ext, tval in extnames:
         if alc.is_extension_present(None, ext):
             stringvals = alc.get_string(None, tval)
             self.assertIsInstance(stringvals, str)
Exemplo n.º 2
0
    def test_is_extension_present(self):
        extnames = ("ALC_ENUMERATION_EXT",
                    "ALC_ENUMERATE_ALL_EXT"
                    )
        for ext in extnames:
            retval = alc.is_extension_present(None, ext)
            self.assertIsInstance(retval, bool)

        self.assertRaises((AttributeError, TypeError),
                          alc.is_extension_present, 1234, "Test")
        self.assertRaises((AttributeError, TypeError),
                          alc.is_extension_present, "Test", "Test")