diff --git a/python/pyspark/tests.py b/python/pyspark/tests.py index 4c067f970ec78..ca0fca2972860 100644 --- a/python/pyspark/tests.py +++ b/python/pyspark/tests.py @@ -879,7 +879,8 @@ def test_pipe_functions(self): rdd = self.sc.parallelize(data) with QuietTest(self.sc): self.assertRaises(Py4JJavaError, rdd.pipe('cc').collect) - result = rdd.pipe('cat').collect().sort() + result = rdd.pipe('cat').collect() + result.sort() [self.assertEqual(x, y) for x, y in zip(data, result)]