ueshin commented on a change in pull request #32177:
URL: https://github.com/apache/spark/pull/32177#discussion_r614276237



##########
File path: python/pyspark/testing/utils.py
##########
@@ -39,6 +54,29 @@
     # No NumPy, but that's okay, we'll skip those tests
     pass
 
+tabulate_requirement_message = None
+try:
+    from tabulate import tabulate  # noqa: F401
+except ImportError as e:
+    # If tabulate requirement is not satisfied, skip related tests.
+    tabulate_requirement_message = str(e)
+have_tabulate = tabulate_requirement_message is None

Review comment:
       If we would follow the similar case, for `pandas` and `pyarrow` in the 
sql module, we could use the `tabulate_requirement_message` for the message in 
`@unittest.skipIf(not have_tabulate, tabulate_requirement_message)`.
   
   
https://github.com/apache/spark/blob/aa3590e655c7d0e9f5fb717aa633b843e42c4a53/python/pyspark/sql/tests/test_arrow.py#L44-L46




-- 
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.

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