MCPcopy Create free account
hub / github.com/apache/arrow / check_ipc_options_repr

Function check_ipc_options_repr

python/pyarrow/tests/test_ipc.py:1355–1370  ·  view source on GitHub ↗
(options_obj, options_args)

Source from the content-addressed store, hash-verified

1353
1354
1355def 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

Callers 2

test_write_options_reprFunction · 0.85
test_read_options_reprFunction · 0.85

Calls 1

__repr__Method · 0.45

Tested by

no test coverage detected