Skip to content

Commit

Permalink
Add a test for rdd pipe functions
Browse files Browse the repository at this point in the history
  • Loading branch information
megatron-me-uk committed Jun 15, 2015
1 parent 1b3dc4e commit 8db4073
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,13 @@ def test_sortByKey_uses_all_partitions_not_only_first_and_last(self):
sizes = sort.glom().map(len).collect()
for size in sizes:
self.assertGreater(size, 0)

def test_pipe_functions(self):
data = ['1','2','3']
rdd = self.sc.parallelize(data)
self.assertRaises(Exception, rdd.pipe('cc').collect())
result = rdd.pipe('cat').collect().sort()
[self.assertEqual(x, y) for x, y in zip(data, result)]


class ProfilerTests(PySparkTestCase):
Expand Down

0 comments on commit 8db4073

Please sign in to comment.