HyukjinKwon opened a new pull request #23604: [SPARK-26676][PYTHON] Make 
HiveContextSQLTests.test_unbounded_frames test compatible with Python 2 and PyPy
URL: https://github.com/apache/spark/pull/23604
 
 
   ## What changes were proposed in this pull request?
   
   This particular test is being skipped at PyPy and Python 2.
   
   ```
   Skipped tests in pyspark.sql.tests.test_context with pypy:
       test_unbounded_frames 
(pyspark.sql.tests.test_context.HiveContextSQLTests) ... skipped "Unittest < 
3.3 doesn't support mocking"
   
   Skipped tests in pyspark.sql.tests.test_context with python2.7:
       test_unbounded_frames 
(pyspark.sql.tests.test_context.HiveContextSQLTests) ... skipped "Unittest < 
3.3 doesn't support mocking"
   ```
   
   We don't have to use unittest 3.3 module to mock. And looks the test itself 
isn't compatible with Python 2.
   
   This PR makes:
    - Manually monkey-patch `sys.maxsize` to get rid of unittest 3.3 condition
    - Use the built-in `reload` in Python 2, and `importlib.reload` in Python 3
   
   ## How was this patch tested?
   
   Manually tested, and unit test is fixed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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