()
| 1103 | |
| 1104 | |
| 1105 | def test_map_with_iterator_function(): |
| 1106 | b = db.from_sequence([[1, 2, 3], [4, 5, 6]], npartitions=2) |
| 1107 | |
| 1108 | def f(L): |
| 1109 | for x in L: |
| 1110 | yield x + 1 |
| 1111 | |
| 1112 | c = b.map(f) |
| 1113 | |
| 1114 | assert list(c) == [[2, 3, 4], [5, 6, 7]] |
| 1115 | |
| 1116 | |
| 1117 | def test_ensure_compute_output_is_concrete(): |