diff -aur python-xmlschema.old/tests/validators/test_schemas.py python-xmlschema/tests/validators/test_schemas.py --- python-xmlschema.old/tests/validators/test_schemas.py 2024-11-30 11:06:29.310300630 +0100 +++ python-xmlschema/tests/validators/test_schemas.py 2024-11-30 11:06:56.080712610 +0100 @@ -916,7 +916,10 @@ with self.assertRaises((pickle.PicklingError, AttributeError)) as ec: pickle.dumps(schema) - self.assertIn("Can't pickle", str(ec.exception)) + error_message = str(ec.exception) + self.assertTrue( + "Can't get local object" in error_message or "Can't pickle" in error_message + ) def test_deprecated_check_schema_method(self):