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

    https://github.com/apache/spark/pull/5173#discussion_r27261926
  
    --- Diff: python/pyspark/tests.py ---
    @@ -234,19 +238,34 @@ def __reduce__(self):
             def foo():
                 sys.exit(0)
     
    -        self.assertTrue("exit" in foo.func_code.co_names)
    +        self.assertTrue("exit" in foo.__code__.co_names)
             ser.dumps(foo)
     
         def test_compressed_serializer(self):
             ser = CompressedSerializer(PickleSerializer())
    -        from StringIO import StringIO
    +        try:
    +            from StringIO import StringIO
    +        except ImportError:
    +            from io import BytesIO as StringIO
             io = StringIO()
             ser.dump_stream(["abc", u"123", range(5)], io)
             io.seek(0)
             self.assertEqual(["abc", u"123", range(5)], 
list(ser.load_stream(io)))
             ser.dump_stream(range(1000), io)
             io.seek(0)
    -        self.assertEqual(["abc", u"123", range(5)] + range(1000), 
list(ser.load_stream(io)))
    +        self.assertEqual(["abc", u"123", range(5)] + list(range(1000)), 
list(ser.load_stream(io)))
    +
    +    def test_hash_serializer(self):
    --- End diff --
    
    Nice!


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