()
| 448 | |
| 449 | |
| 450 | def test_external_source_generator(): |
| 451 | pipe = Pipeline(1, 3, 0) |
| 452 | |
| 453 | def gen(): |
| 454 | for i in range(5): |
| 455 | yield [make_array([i + 1.5], dtype=datapy.float32)] |
| 456 | |
| 457 | pipe.set_outputs(fn.external_source(gen())) |
| 458 | |
| 459 | for i in range(5): |
| 460 | check_output(pipe.run(), [np.array([i + 1.5], dtype=np.float32)]) |
| 461 | |
| 462 | |
| 463 | def test_external_source_gen_function_cycle(): |
nothing calls this directly
no test coverage detected