    def test_RefResolver_in_scope(self):
        """
        As of v4.0.0, RefResolver.in_scope is deprecated.
        """

        resolver = validators._RefResolver.from_schema({})
        message = "jsonschema.RefResolver.in_scope is deprecated "
        with self.assertWarnsRegex(DeprecationWarning, message) as w:  # noqa: SIM117
            with resolver.in_scope("foo"):
                pass

        self.assertEqual(w.filename, __file__)
As of v4.0.0, RefResolver.in_scope is deprecated.
jsonschema/tests/test_deprecations.py