def test_hashException(self):
        """
        Rebuilding something that has a __hash__ that raises a non-TypeError
        shouldn't cause rebuild to die.
        """
        global unhashableObject
        unhashableObject = HashRaisesRuntimeError()
        def _cleanup():
            global unhashableObject
            unhashableObject = None
        self.addCleanup(_cleanup)
        rebuild.rebuild(rebuild)
        self.assertTrue(unhashableObject.hashCalled)

        Rebuilding something that has a __hash__ that raises a non-TypeError
        shouldn't cause rebuild to die.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_rebuild.py