'Test converting a ctypes type to a Numba type.'

@tag('important')
def test_from_ctypes(self):

    def check(cty, ty):
        got = ctypes_utils.from_ctypes(cty)
        self.assertEqual(got, ty)
    self._conversion_tests(check)
    with self.assertRaises(TypeError) as raises:
        ctypes_utils.from_ctypes(c_wchar_p)
    self.assertIn('Unsupported    ctypes    type', str(raises.exception))
