HyukjinKwon opened a new pull request #24927: [SPARK-28130][PYTHON] Print 
pretty messages for skipped tests when xmlrunner is available in PySpark
URL: https://github.com/apache/spark/pull/24927
 
 
   ## What changes were proposed in this pull request?
   
   Currently, pretty skipped message added by 
https://github.com/apache/spark/commit/f7435bec6a9348cfbbe26b13c230c08545d16067 
mechanism seems not working.
   
   This PR fixes two things:
   
   1. When `xmlrunner` is installed, seems `xmlrunner` does not respect 
`vervosity` level in unittests (default is level 1).
   
       So the output looks as below
   
       ```
       Running tests...
        ----------------------------------------------------------------------
       SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
       ----------------------------------------------------------------------
       ```
   
       So it is not caught by our message detection mechanism.
   
   2. If we manually set the `vervocity` level to `xmlrunner`, it prints 
messages as below:
   
       ```
       test_mixed_udf 
(pyspark.sql.tests.test_pandas_udf_scalar.ScalarPandasUDFTests) ... SKIP 
(0.000s)
       test_mixed_udf_and_sql 
(pyspark.sql.tests.test_pandas_udf_scalar.ScalarPandasUDFTests) ... SKIP 
(0.000s)
       ...
       ```
   
       This is different in our Jenkins machine:
   
       ```
       test_createDataFrame_column_name_encoding 
(pyspark.sql.tests.test_arrow.ArrowTests) ... skipped 'Pandas >= 0.23.2 must be 
installed; however, it was not found.'
       test_createDataFrame_does_not_modify_input 
(pyspark.sql.tests.test_arrow.ArrowTests) ... skipped 'Pandas >= 0.23.2 must be 
installed; however, it was not found.'
       ...
       ```
   
       Note that last `SKIP` is different. This PR fixes the regular expression 
to catch `SKIP` case as well.
   
   ## How was this patch tested?
   
   Manually tested.
   
   **Before:**
   
   ```
   Starting test(python2.7): pyspark....
   Finished test(python2.7): pyspark.... (0s)
   ...
   Tests passed in 562 seconds
   
   ========================================================================
   ...
   ```
   
   **After:**
   
   ```
   Starting test(python2.7): pyspark....
   Finished test(python2.7): pyspark.... (48s) ... 93 tests were skipped
   ...
   Tests passed in 560 seconds
   
   Skipped tests in pyspark.databricks.sql.tests.test_pandas_udf_prefetch with 
python2.7:
          test_datasource_with_udf 
(pyspark.sql.tests.test_pandas_udf_scalar.ScalarPandasUDFTests) ... SKIP 
(0.000s)
   ...
   
   ========================================================================
   ...
   
   
   ```

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


With regards,
Apache Git Services

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

Reply via email to