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

Function test_make_write_options_error

python/pyarrow/tests/test_dataset.py:5952–5968  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5950
5951
5952def test_make_write_options_error():
5953 # GH-39440: calling make_write_options as a static class method
5954 msg_1 = ("make_write_options() should be called on an "
5955 "instance of ParquetFileFormat")
5956 # GH-41043: In Cython2 all Cython methods were "regular" C extension methods
5957 # see: https://github.com/cython/cython/issues/6127#issuecomment-2038153359
5958 msg_2 = ("descriptor 'make_write_options' for "
5959 "'pyarrow._dataset_parquet.ParquetFileFormat' objects "
5960 "doesn't apply to a 'int'")
5961 with pytest.raises(TypeError) as excinfo:
5962 pa.dataset.ParquetFileFormat.make_write_options(43)
5963 assert msg_1 in str(excinfo.value) or msg_2 in str(excinfo.value)
5964
5965 pformat = pa.dataset.ParquetFileFormat()
5966 msg = "make_write_options\\(\\) takes exactly 0 positional arguments"
5967 with pytest.raises(TypeError, match=msg):
5968 pformat.make_write_options(43)
5969
5970
5971@pytest.mark.substrait

Callers

nothing calls this directly

Calls 1

ParquetFileFormatMethod · 0.80

Tested by

no test coverage detected