def test_weakref(self):
        """
        Test references search through a weakref object.
        """
        class Dummy:
            pass
        o = Dummy()
        w1 = weakref.ref(o)

        self.assertIn("()", reflect.objgrep(w1, o, reflect.isSame))

        Test references search through a weakref object.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_reflect.py