aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/tests.py
diff options
context:
space:
mode:
authorJosh Rosen <joshrosen@eecs.berkeley.edu>2013-02-01 00:25:19 -0800
committerJosh Rosen <joshrosen@eecs.berkeley.edu>2013-02-01 00:25:19 -0800
commit57b64d0d1902eb51bf79f595626c2b9f80a9d1e2 (patch)
treeee2613516b3460061b8b71bdd62b994a3715efbf /python/pyspark/tests.py
parent7e2e046e37df6f71969a85f9995cb830be492050 (diff)
downloadspark-57b64d0d1902eb51bf79f595626c2b9f80a9d1e2.tar.gz
spark-57b64d0d1902eb51bf79f595626c2b9f80a9d1e2.tar.bz2
spark-57b64d0d1902eb51bf79f595626c2b9f80a9d1e2.zip
Fix stdout redirection in PySpark.
Diffstat (limited to 'python/pyspark/tests.py')
-rw-r--r--python/pyspark/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/pyspark/tests.py b/python/pyspark/tests.py
index df7235756d..52297d44e6 100644
--- a/python/pyspark/tests.py
+++ b/python/pyspark/tests.py
@@ -108,5 +108,14 @@ class TestAddFile(PySparkTestCase):
self.assertEqual("Hello World!", UserClass().hello())
+class TestIO(PySparkTestCase):
+
+ def test_stdout_redirection(self):
+ import subprocess
+ def func(x):
+ subprocess.check_call('ls', shell=True)
+ self.sc.parallelize([1]).foreach(func)
+
+
if __name__ == "__main__":
unittest.main()