(device, test_data_root, names)
| 414 | |
| 415 | |
| 416 | def check_dim_mismatch(device, test_data_root, names): |
| 417 | pipe = Pipeline(2, 2, 0) |
| 418 | pipe.set_outputs(fn.readers.numpy(device=device, file_root=test_data_root, files=names)) |
| 419 | err = None |
| 420 | try: |
| 421 | pipe.run() |
| 422 | except RuntimeError as thrown: |
| 423 | err = thrown |
| 424 | finally: |
| 425 | del pipe |
| 426 | # asserts should not be in except block to avoid printing nested exception on failure |
| 427 | assert err, "Exception not thrown" |
| 428 | assert "Inconsistent data" in str(err), "Unexpected error message: {}".format(err) |
| 429 | |
| 430 | |
| 431 | @params(*(["cpu", "gpu"] if is_gds_supported() else ["cpu"])) |
no test coverage detected