def test_unsupportedType(self):
        """
        L{aot.jellyToSource} should raise a C{TypeError} when trying to jelly
        an unknown type without a C{__dict__} property or C{__getstate__}
        method.
        """
        class UnknownType(object):
            @property
            def __dict__(self):
                raise AttributeError()
        self.assertRaises(TypeError, aot.jellyToSource, UnknownType())

        L{aot.jellyToSource} should raise a C{TypeError} when trying to jelly
        an unknown type without a C{__dict__} property or C{__getstate__}
        method.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_persisted.py