Show More
@@ -59,6 +59,14 b' class TestLoadBalancedView(ClusterTestCase):' | |||||
59 | r = self.view.map_sync(f, data) |
|
59 | r = self.view.map_sync(f, data) | |
60 | self.assertEqual(r, map(f, data)) |
|
60 | self.assertEqual(r, map(f, data)) | |
61 |
|
61 | |||
|
62 | def test_map_generator(self): | |||
|
63 | def f(x): | |||
|
64 | return x**2 | |||
|
65 | ||||
|
66 | data = range(16) | |||
|
67 | r = self.view.map_sync(f, iter(data)) | |||
|
68 | self.assertEqual(r, map(f, iter(data))) | |||
|
69 | ||||
62 | def test_map_short_first(self): |
|
70 | def test_map_short_first(self): | |
63 | def f(x,y): |
|
71 | def f(x,y): | |
64 | if y is None: |
|
72 | if y is None: |
General Comments 0
You need to be logged in to leave comments.
Login now