()
| 5950 | |
| 5951 | |
| 5952 | def 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 |
nothing calls this directly
no test coverage detected