Exemple #1
0
 def test_cogroup_only_one(self):
     empty = MockRDD.empty().persist()
     one = MockRDD.of(('k', 1)).persist()
     self.assertEqual(empty.cogroup(one).collect(), [('k', ([], [1]))])
     self.assertEqual(one.cogroup(empty).collect(), [('k', ([1], []))])
Exemple #2
0
 def test_cogroup_empty(self):
     self.assertEqual(MockRDD.empty().cogroup(MockRDD.empty()).count(), 0)