File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6868 RemoveSnapshotRefUpdate ,
6969 RemoveSnapshotsUpdate ,
7070 SetSnapshotRefUpdate ,
71- TableRequirement ,
7271 TableMetadata ,
72+ TableRequirement ,
7373 TableUpdate ,
7474 U ,
7575 UpdatesAndRequirements ,
7676 UpdateTableMetadata ,
7777)
78-
7978from pyiceberg .typedef import (
8079 EMPTY_DICT ,
8180 KeyDefaultDict ,
8584from pyiceberg .utils .properties import property_as_bool , property_as_int
8685
8786if TYPE_CHECKING :
88- from pyiceberg . table import Table
87+ pass
8988
90- from pyiceberg .table .metadata import Snapshot
91- from pyiceberg .table .update import UpdateTableMetadata
92- from typing import Optional , Set
93- from datetime import datetime , timezone
9489
95- from typing import Dict , Optional , Set
96- import uuid
97- from pyiceberg .table .metadata import TableMetadata
90+ from pyiceberg .table .metadata import Snapshot , TableMetadata
9891from pyiceberg .table .snapshots import Snapshot
99- from pyiceberg .table .update import (
100- UpdateTableMetadata ,
101- RemoveSnapshotsUpdate ,
102- UpdatesAndRequirements ,
103- AssertRefSnapshotId ,
104- )
92+
10593
10694def _new_manifest_file_name (num : int , commit_uuid : uuid .UUID ) -> str :
10795 return f"{ commit_uuid } -m{ num } .avro"
Original file line number Diff line number Diff line change 1+ from unittest .mock import MagicMock
12from uuid import uuid4
3+
24from pyiceberg .table import CommitTableResponse , Table
3- from unittest . mock import MagicMock
5+
46
57def test_expire_snapshot (table_v2 : Table ) -> None :
68 EXPIRE_SNAPSHOT = 3051729675574597004
@@ -10,7 +12,7 @@ def test_expire_snapshot(table_v2: Table) -> None:
1012 # Use the table's current metadata but keep only the snapshot not to be expired
1113 metadata = table_v2 .metadata .model_copy (update = {"snapshots" : [KEEP_SNAPSHOT ]}),
1214 metadata_location = "mock://metadata/location" ,
13- uuid = uuid4 ()
15+ uuid = uuid4 (),
1416 )
1517
1618 # Mock the commit_table method to return the mock response
You can’t perform that action at this time.
0 commit comments