()
| 566 | |
| 567 | |
| 568 | def test_output_layout(): |
| 569 | pipe = CommonPipeline(1, 1, 0, 999, images_dir) |
| 570 | with pipe: |
| 571 | images, _ = pipe.load() |
| 572 | out1, out2 = fn.python_function( |
| 573 | images, function=lambda x: (x, x.mean(2)), num_outputs=2, output_layouts=["ABC", "DE"] |
| 574 | ) |
| 575 | out3, out4 = fn.python_function( |
| 576 | images, function=lambda x: (x, x / 2), num_outputs=2, output_layouts="FGH" |
| 577 | ) |
| 578 | out5, out6 = fn.python_function( |
| 579 | images, function=lambda x: (x, x / 2), num_outputs=2, output_layouts=["IJK"] |
| 580 | ) |
| 581 | |
| 582 | pipe.set_outputs(out1, out2, out3, out4, out5, out6) |
| 583 | out1, out2, out3, out4, out5, out6 = pipe.run() |
| 584 | assert out1.layout() == "ABC" |
| 585 | assert out2.layout() == "DE" |
| 586 | assert out3.layout() == "FGH" |
| 587 | assert out4.layout() == "FGH" |
| 588 | assert out5.layout() == "IJK" |
| 589 | assert out6.layout() == "" |
| 590 | |
| 591 | |
| 592 | @raises(RuntimeError, "*length of*output_layouts*greater than*") |
nothing calls this directly
no test coverage detected