Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
davies committed Sep 11, 2014
1 parent b20ab3a commit 4bc1f04
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,11 @@ def __getattr__(self, item):
getter2 = ser.loads(ser.dumps(getter))
self.assertEqual(getter(d), getter2(d))


# Regression test for SPARK-3415
class CloudPickleTest(unittest.TestCase):
# Regression test for SPARK-3415
def test_pickling_file_handles(self):
from pyspark.cloudpickle import dumps
from StringIO import StringIO
from pickle import load
ser = CloudPickleSerializer()
out1 = sys.stderr
out2 = load(StringIO(dumps(out1)))
out2 = ser.loads(ser.dumps(out1))
self.assertEquals(out1, out2)


Expand Down

0 comments on commit 4bc1f04

Please sign in to comment.