def METHOD_NAME(self):
    # __setstate__ should neither raise a SystemError nor crash in case
    # of a bad __dict__.
    from ctypes import Structure
    class BadStruct(Structure):
        @property
        def __dict__(self):
            pass
    with self.assertRaises(TypeError):
        BadStruct().__setstate__({}, b'foo')
    class WorseStruct(Structure):
        @property
        def __dict__(self):
            1/0.0
    with self.assertRaises(ZeroDivisionError):
        WorseStruct().__setstate__({}, b'foo')