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

Function check_ipc_options_repr

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

Source from the content-addressed store, hash-verified

1377
1378
1379def check_ipc_options_repr(options_obj, options_args):
1380 options = options_obj(**options_args)
1381 repr = options.__repr__()
1382
1383 for arg, val in options_args.items():
1384 if val is None:
1385 continue
1386
1387 value = val if not isinstance(val, str) else f"\"{val}\""
1388
1389 if arg == "ensure_alignment":
1390 value = pa.ipc.Alignment(val).name
1391 elif arg == "metadata_version":
1392 value = pa.ipc.MetadataVersion(val).name
1393
1394 assert f"{arg}={value}" in repr
1395
1396
1397@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