Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21107#discussion_r182779626
  
    --- Diff: python/run-tests.py ---
    @@ -109,7 +111,24 @@ def run_individual_python_test(test_name, 
pyspark_python):
                 # this code is invoked from a thread other than the main 
thread.
                 os._exit(-1)
         else:
    -        per_test_output.close()
    +        try:
    +            per_test_output.seek(0)
    +            # Here expects skipped test output from unittest when 
verbosity level is
    +            # 2 (or --verbose option is enabled).
    +            decoded_lines = map(lambda line: line.decode(), 
iter(per_test_output))
    +            skipped_tests = list(
    +                filter(lambda line: re.search('\) ... skipped ', line), 
decoded_lines))
    +            if len(skipped_tests) > 0:
    +                key = (pyspark_python, test_name)
    +                SKIPPED_TESTS[key] = skipped_tests
    +            per_test_output.close()
    +        except:
    +            import traceback
    +            print_red("\nGot an exception while trying to store "
    +                      "skipped test output:\n%s" % traceback.format_exc())
    --- End diff --
    
    Just in case anyone is worried: 
    
    ```
    Got an exception while trying to store skipped test output:
    Traceback (most recent call last):
      File "./python/run-tests.py", line 116, in run_individual_python_test
        per_test_output.seek()
    TypeError: seek() takes at least 1 argument (0 given)
    ```


---

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

Reply via email to