Skip to content

Commit 076a6d5

Browse files
committed
Fixed some more tests
1 parent dfedc63 commit 076a6d5

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

pyiceberg/table/update/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,6 @@ def validate(self, base_metadata: Optional[TableMetadata]) -> None:
623623
if self.snapshot_id is None:
624624
raise CommitFailedException(f"Requirement failed: {ref_type} {self.ref} was created concurrently")
625625
elif self.snapshot_id != snapshot_ref.snapshot_id:
626-
if ref_type == SnapshotRefType.TAG:
627-
raise CommitFailedException(f"Requirement failed: TAG {self.ref} can't be updated once created")
628626
raise CommitFailedException(
629627
f"Requirement failed: {ref_type} {self.ref} has changed: expected id {self.snapshot_id}, found {snapshot_ref.snapshot_id}"
630628
)

tests/table/test_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ def test_assert_ref_snapshot_id(table_v2: Table) -> None:
10151015

10161016
with pytest.raises(
10171017
CommitFailedException,
1018-
match="Requirement failed: TAG test can't be updated once created",
1018+
match="Requirement failed: tag test has changed: expected id 3055729675574597004, found 3051729675574597004",
10191019
):
10201020
AssertRefSnapshotId(ref="test", snapshot_id=3055729675574597004).validate(base_metadata)
10211021

0 commit comments

Comments
 (0)