3131)
3232
3333
34- def test_serialize_plan_table_scan_request ():
34+ def test_serialize_plan_table_scan_request () -> None :
3535 """Test serializing a PlanTableScanRequest to a dict"""
3636 expression = AndOrExpression (
3737 type = "and" ,
@@ -63,7 +63,7 @@ def test_serialize_plan_table_scan_request():
6363 assert request .model_dump_json (exclude_none = True ) == snapshot_json_for_plan_table_scan_request ()
6464
6565
66- def test_deserialize_plan_table_scan_request ():
66+ def test_deserialize_plan_table_scan_request () -> None :
6767 """Test deserializing a PlanTableScanRequest from a dict"""
6868 expression = AndOrExpression (
6969 type = "and" ,
@@ -95,7 +95,7 @@ def test_deserialize_plan_table_scan_request():
9595 assert request == PlanTableScanRequest .model_validate_json (snapshot_json_for_plan_table_scan_request ())
9696
9797
98- def test_deserialize_scan_tasks ():
98+ def test_deserialize_scan_tasks () -> None :
9999 """Test deserializing a ScanTasks from a dict"""
100100 scan_tasks = ScanTasks .model_validate_json (snapshot_json_for_scan_tasks ())
101101 assert len (scan_tasks .file_scan_tasks ) == 1
@@ -105,7 +105,7 @@ def test_deserialize_scan_tasks():
105105 assert scan_tasks .delete_files [1 ].root .file_path == "/path/to/delete-b.parquet"
106106
107107
108- def test_serialize_scan_tasks ():
108+ def test_serialize_scan_tasks () -> None :
109109 """Test serializing a ScanTasks to a dict"""
110110 scan_tasks = ScanTasks (
111111 file_scan_tasks = [
@@ -151,9 +151,9 @@ def test_serialize_scan_tasks():
151151 assert scan_tasks .model_dump_json (exclude_none = True ) == snapshot_json_for_scan_tasks ()
152152
153153
154- def snapshot_json_for_plan_table_scan_request ():
154+ def snapshot_json_for_plan_table_scan_request () -> str :
155155 return """{"snapshot-id":1,"select":["a","b","c"],"filter":{"type":"and","left":{"type":"or","left":{"type":"and","left":{"type":"lt","term":"a","value":{"type":"integer","value":1}},"right":{"type":"lt-eq","term":"b","value":{"type":"integer","value":2}}},"right":{"type":"eq","term":"c","value":{"type":"integer","value":3}}},"right":{"type":"gt","term":"d","value":{"type":"integer","value":4}}},"case-sensitive":true,"use-snapshot-schema":false}"""
156156
157157
158- def snapshot_json_for_scan_tasks ():
158+ def snapshot_json_for_scan_tasks () -> str :
159159 return """{"delete-files":[{"content":"position-deletes","file-path":"/path/to/delete-a.parquet","file-format":"parquet","spec-id":0,"partition":[],"file-size-in-bytes":256,"record-count":10},{"content":"equality-deletes","file-path":"/path/to/delete-b.parquet","file-format":"parquet","spec-id":0,"partition":[],"file-size-in-bytes":256,"record-count":10,"equality-ids":[1,2]}],"file-scan-tasks":[{"data-file":{"content":"data","file-path":"/path/to/data-a.parquet","file-format":"parquet","spec-id":0,"partition":[],"file-size-in-bytes":1024,"record-count":56},"delete-file-references":[0,1]}]}"""
0 commit comments