We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b20ab3a commit 4bc1f04Copy full SHA for 4bc1f04
python/pyspark/tests.py
@@ -205,15 +205,11 @@ def __getattr__(self, item):
205
getter2 = ser.loads(ser.dumps(getter))
206
self.assertEqual(getter(d), getter2(d))
207
208
-
209
-# Regression test for SPARK-3415
210
-class CloudPickleTest(unittest.TestCase):
+ # Regression test for SPARK-3415
211
def test_pickling_file_handles(self):
212
- from pyspark.cloudpickle import dumps
213
- from StringIO import StringIO
214
- from pickle import load
+ ser = CloudPickleSerializer()
215
out1 = sys.stderr
216
- out2 = load(StringIO(dumps(out1)))
+ out2 = ser.loads(ser.dumps(out1))
217
self.assertEquals(out1, out2)
218
219
0 commit comments