spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e-dorigatti <...@git.apache.org>
Subject [GitHub] spark pull request #21383: [SPARK-23754][Python] Re-raising StopIteration in...
Date Thu, 24 May 2018 14:19:36 GMT
Github user e-dorigatti commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21383#discussion_r190567010
  
    --- Diff: python/pyspark/tests.py ---
    @@ -1246,6 +1277,31 @@ def test_pipe_unicode(self):
             result = rdd.pipe('cat').collect()
             self.assertEqual(data, result)
     
    +    def test_stopiteration_in_client_code(self):
    +
    +        def a_rdd(keyed=False):
    +            return self.sc.parallelize(
    +                ((x % 2, x) if keyed else x)
    +                for x in range(10)
    +            )
    +
    +        def stopit(*x):
    +            raise StopIteration()
    +
    +        def do_test(action, *args, **kwargs):
    +            with self.assertRaises((Py4JJavaError, RuntimeError)) as cm:
    --- End diff --
    
    Can you clarify?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message