diff --git a/python/pyspark/errors/tests/test_errors.py b/python/pyspark/errors/tests/test_errors.py index e191d7eff38b9..d9a8cf45bceda 100644 --- a/python/pyspark/errors/tests/test_errors.py +++ b/python/pyspark/errors/tests/test_errors.py @@ -32,8 +32,11 @@ def test_error_classes_sorted(self): for i in range(len(error_class_names) - 1): self.assertTrue( error_class_names[i] < error_class_names[i + 1], - f"Error class [{error_class_names[i]}] should place" - f"after [{error_class_names[i + 1]}]", + f"Error class [{error_class_names[i]}] should place " + f"after [{error_class_names[i + 1]}]." + "\n\nRun 'cd $SPARK_HOME; bin/pyspark' and " + "'from pyspark.errors.exceptions import _write_self; _write_self()' " + "to automatically sort them.", ) def test_error_classes_duplicated(self):