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

    https://github.com/apache/spark/pull/2287#discussion_r17211687
  
    --- Diff: python/pyspark/tests.py ---
    @@ -181,6 +181,17 @@ def tearDown(self):
             sys.path = self._old_sys_path
     
     
    +# Regression test for SPARK-3415
    +class CloudPickleTest(unittest.TestCase):
    +    def test_pickling_file_handles(self):
    +        from pyspark.cloudpickle import dumps
    +        out = sys.stderr
    +        r = dumps(out)
    +        exp = ('\x80\x02c__builtin__\ngetattr\nq\x00cpyspark.cloudpickle\n'
    --- End diff --
    
    There is no load in cloudpickle, so I used the default one in python. Test 
dumps it, loads it, and compares it against original. Also moved the code under 
SerializationTestCase


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to