Exemplo n.º 1
0
 def test_persist(self):
     rdd = MockRDD(identity, iter(range(5))).persist()
     for _ in range(10):
         self.assertEqual(rdd.collect(), list(range(5)))
Exemplo n.º 2
0
 def test_only_one_pass(self):
     rdd = MockRDD(identity, iter(range(5)))
     self.assertEqual(rdd.collect(), list(range(5)))
     with self.assertWarns(Warning):
         self.assertEqual(rdd.collect(), [])