()
| 1372 | def test_conditional(): |
| 1373 | @experimental_pipeline_def(enable_conditionals=True) |
| 1374 | def conditional_pipeline(): |
| 1375 | true = types.Constant(np.array(True), device="cpu") |
| 1376 | false = types.Constant(np.array(False), device="cpu") |
| 1377 | if true and true or not false: |
| 1378 | output = types.Constant(np.array([42]), device="cpu") |
| 1379 | else: |
| 1380 | output = types.Constant(np.array([0]), device="cpu") |
| 1381 | return output |
| 1382 | |
| 1383 | cond_pipe = conditional_pipeline(batch_size=5, num_threads=1, device_id=None) |
| 1384 | cond_pipe.run() |
no test coverage detected