This is an automated email from the ASF dual-hosted git repository. ruifengz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new df4370c0759b [SPARK-46808][PYTHON][FOLLOW-UP] Add a guide for automatic sorting in `test_error_classes_sorted` df4370c0759b is described below commit df4370c0759b336fb1b4ec5310fcab6f032ff8e3 Author: Hyukjin Kwon <gurwls...@apache.org> AuthorDate: Thu Jan 25 11:33:27 2024 +0800 [SPARK-46808][PYTHON][FOLLOW-UP] Add a guide for automatic sorting in `test_error_classes_sorted` ### What changes were proposed in this pull request? This PR is a followup of https://github.com/apache/spark/pull/44848 that adds a bit of guide to sort the error classes. ### Why are the changes needed? For developers to easily sort the error classes. ### Does this PR introduce _any_ user-facing change? No, dev-only. ### How was this patch tested? Manually. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #44874 from HyukjinKwon/minor-error-sort. Authored-by: Hyukjin Kwon <gurwls...@apache.org> Signed-off-by: Ruifeng Zheng <ruife...@apache.org> --- python/pyspark/errors/tests/test_errors.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/pyspark/errors/tests/test_errors.py b/python/pyspark/errors/tests/test_errors.py index e191d7eff38b..d9a8cf45bced 100644 --- a/python/pyspark/errors/tests/test_errors.py +++ b/python/pyspark/errors/tests/test_errors.py @@ -32,8 +32,11 @@ class ErrorsTest(unittest.TestCase): 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): --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org