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