(options_obj, options_args)
| 1353 | |
| 1354 | |
| 1355 | def check_ipc_options_repr(options_obj, options_args): |
| 1356 | options = options_obj(**options_args) |
| 1357 | repr = options.__repr__() |
| 1358 | |
| 1359 | for arg, val in options_args.items(): |
| 1360 | if val is None: |
| 1361 | continue |
| 1362 | |
| 1363 | value = val if not isinstance(val, str) else f"\"{val}\"" |
| 1364 | |
| 1365 | if arg == "ensure_alignment": |
| 1366 | value = pa.ipc.Alignment(val).name |
| 1367 | elif arg == "metadata_version": |
| 1368 | value = pa.ipc.MetadataVersion(val).name |
| 1369 | |
| 1370 | assert f"{arg}={value}" in repr |
| 1371 | |
| 1372 | |
| 1373 | @pytest.fixture |
no test coverage detected