    def test_import_FormatError(self):
        """
        As of v4.18.0, importing FormatError from the package root is
        deprecated in favor of doing so from jsonschema.exceptions.
        """

        message = "Importing FormatError directly from the jsonschema package "
        with self.assertWarnsRegex(DeprecationWarning, message) as w:
            from jsonschema import FormatError

        self.assertEqual(FormatError, exceptions.FormatError)
        self.assertEqual(w.filename, __file__)
As of v4.18.0, importing FormatError from the package root is
deprecated in favor of doing so from jsonschema.exceptions.
jsonschema/tests/test_deprecations.py