    def test_validators_ErrorTree(self):
        """
        As of v4.0.0, importing ErrorTree from jsonschema.validators is
        deprecated in favor of doing so from jsonschema.exceptions.
        """

        message = "Importing ErrorTree from jsonschema.validators is "
        with self.assertWarnsRegex(DeprecationWarning, message) as w:
            from jsonschema.validators import ErrorTree

        self.assertEqual(ErrorTree, exceptions.ErrorTree)
        self.assertEqual(w.filename, __file__)
As of v4.0.0, importing ErrorTree from jsonschema.validators is
deprecated in favor of doing so from jsonschema.exceptions.
jsonschema/tests/test_deprecations.py