Skip to content

Commit

Permalink
Pass a function handle to assertRaises
Browse files Browse the repository at this point in the history
Also be more specific about the Exception we expect to see
  • Loading branch information
megatron-me-uk committed Jun 18, 2015
1 parent 3344a21 commit 491d3fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/pyspark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def test_pipe_functions(self):
data = ['1', '2', '3']
rdd = self.sc.parallelize(data)
with QuietTest(self.sc):
self.assertRaises(Exception, rdd.pipe('cc').collect())
self.assertRaises(Py4JJavaError, rdd.pipe('cc').collect)
result = rdd.pipe('cat').collect().sort()
[self.assertEqual(x, y) for x, y in zip(data, result)]

Expand Down

0 comments on commit 491d3fc

Please sign in to comment.