##// END OF EJS Templates
test view.map on mismatches sequences
MinRK -
Show More
@@ -59,6 +59,32 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_short_first(self):
63 def f(x,y):
64 if y is None:
65 return y
66 if x is None:
67 return x
68 return x*y
69 data = range(10)
70 data2 = range(4)
71
72 r = self.view.map_sync(f, data, data2)
73 self.assertEqual(r, map(f, data, data2))
74
75 def test_map_short_last(self):
76 def f(x,y):
77 if y is None:
78 return y
79 if x is None:
80 return x
81 return x*y
82 data = range(4)
83 data2 = range(10)
84
85 r = self.view.map_sync(f, data, data2)
86 self.assertEqual(r, map(f, data, data2))
87
62 def test_map_unordered(self):
88 def test_map_unordered(self):
63 def f(x):
89 def f(x):
64 return x**2
90 return x**2
General Comments 0
You need to be logged in to leave comments. Login now