    def test_RefResolutionError(self):
        """
        As of v4.18.0, RefResolutionError is deprecated in favor of directly
        catching errors from the referencing library.
        """

        message = "jsonschema.exceptions.RefResolutionError is deprecated"
        with self.assertWarnsRegex(DeprecationWarning, message) as w:
            from jsonschema import RefResolutionError

        self.assertEqual(RefResolutionError, exceptions._RefResolutionError)
        self.assertEqual(w.filename, __file__)

        with self.assertWarnsRegex(DeprecationWarning, message) as w:
            from jsonschema.exceptions import RefResolutionError

        self.assertEqual(RefResolutionError, exceptions._RefResolutionError)
        self.assertEqual(w.filename, __file__)
As of v4.18.0, RefResolutionError is deprecated in favor of directly
catching errors from the referencing library.
jsonschema/tests/test_deprecations.py