File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1616# under the License.
1717
1818import json
19- import os
2019import uuid
2120from typing import Any
2221
2827from pyiceberg .table .metadata import TableMetadataV1
2928from pyiceberg .table .update import AssertRefSnapshotId , TableRequirement
3029from pyiceberg .typedef import IcebergBaseModel
30+ from pyiceberg .utils .config import Config
3131
3232
3333def test_legacy_current_snapshot_id (
@@ -41,7 +41,14 @@ def test_legacy_current_snapshot_id(
4141 static_table = StaticTable .from_metadata (metadata_location )
4242 assert static_table .metadata .current_snapshot_id is None
4343
44- mocker .patch .dict (os .environ , values = {"PYICEBERG_LEGACY_CURRENT_SNAPSHOT_ID" : "True" })
44+ mocker .patch (
45+ "pyiceberg.serializers.Config" ,
46+ return_value = Config ({"legacy-current-snapshot-id" : "True" }),
47+ )
48+ mocker .patch (
49+ "pyiceberg.table.metadata.Config" ,
50+ return_value = Config ({"legacy-current-snapshot-id" : "True" }),
51+ )
4552
4653 ToOutputFile .table_metadata (metadata , PyArrowFileIO ().new_output (location = metadata_location ), overwrite = True )
4754 with PyArrowFileIO ().new_input (location = metadata_location ).open () as input_stream :
You can’t perform that action at this time.
0 commit comments