HyukjinKwon commented on code in PR #39387:
URL: https://github.com/apache/spark/pull/39387#discussion_r1064067563


##########
python/pyspark/testing/utils.py:
##########
@@ -138,6 +140,32 @@ def setUpClass(cls):
     def tearDownClass(cls):
         cls.sc.stop()
 
+    def check_error(
+        self,
+        exception: PySparkException,
+        error_class: str,
+        message_parameters: Optional[Dict[str, str]] = None,
+    ):
+        # If exception is generated as a context of assertRaises,
+        # get an actual exception from the context.
+        if isinstance(exception, unittest.case._AssertRaisesContext):

Review Comment:
   Is this standard way of doing this by using the class start with `_` prefix 
classes?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to