From 939db6e866757318e783b562363b5ed91a4d0d3c 2012-07-26 05:34:33 From: MinRK Date: 2012-07-26 05:34:33 Subject: [PATCH] test canning of func_defaults --- diff --git a/IPython/parallel/tests/test_view.py b/IPython/parallel/tests/test_view.py index fca0956..cc88799 100644 --- a/IPython/parallel/tests/test_view.py +++ b/IPython/parallel/tests/test_view.py @@ -593,5 +593,17 @@ class TestView(ClusterTestCase, ParametricTestCase): self.assertTrue("data" in output) data = output['data'] self.assertTrue("image/png" in data) + + def test_func_default_func(self): + """interactively defined function as apply func default""" + def foo(): + return 'foo' + + def bar(f=foo): + return f() + view = self.client[-1] + ar = view.apply_async(bar) + r = ar.get(10) + self.assertEquals(r, 'foo')