(pickle_module)
| 1105 | |
| 1106 | |
| 1107 | def test_fragment_scan_options_pickling(pickle_module): |
| 1108 | options = [ |
| 1109 | ds.CsvFragmentScanOptions(), |
| 1110 | ds.CsvFragmentScanOptions( |
| 1111 | convert_options=pa.csv.ConvertOptions(strings_can_be_null=True)), |
| 1112 | ds.CsvFragmentScanOptions( |
| 1113 | read_options=pa.csv.ReadOptions(block_size=2**16)), |
| 1114 | ds.JsonFragmentScanOptions(), |
| 1115 | ds.JsonFragmentScanOptions( |
| 1116 | pa.json.ParseOptions(newlines_in_values=False, |
| 1117 | unexpected_field_behavior="error")), |
| 1118 | ds.JsonFragmentScanOptions( |
| 1119 | read_options=pa.json.ReadOptions(use_threads=True, block_size=512)), |
| 1120 | ] |
| 1121 | |
| 1122 | if pq is not None: |
| 1123 | options.extend([ |
| 1124 | ds.ParquetFragmentScanOptions(buffer_size=4096), |
| 1125 | ds.ParquetFragmentScanOptions(pre_buffer=True), |
| 1126 | ]) |
| 1127 | |
| 1128 | for option in options: |
| 1129 | assert pickle_module.loads(pickle_module.dumps(option)) == option |
| 1130 | |
| 1131 | |
| 1132 | @pytest.mark.parametrize('paths_or_selector', [ |
nothing calls this directly
no test coverage detected