Skip to content

Commit c100476

Browse files
committed
Backport fix for Hive catalog test failure on CPython 3.13.12
Cherry-pick of apache/iceberg-python#3043. Use reset_mock() instead of directly assigning call_count = 0, which no longer works on CPython 3.13.12.
1 parent c1457aa commit c100476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/catalog/test_hive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,8 +1314,8 @@ def test_hive_wait_for_lock() -> None:
13141314
assert catalog._client.check_lock.call_count == 3
13151315

13161316
# lock wait should exit with WaitingForLockException finally after enough retries
1317+
catalog._client.check_lock.reset_mock()
13171318
catalog._client.check_lock.side_effect = [waiting for _ in range(10)]
1318-
catalog._client.check_lock.call_count = 0
13191319
with pytest.raises(WaitingForLockException):
13201320
catalog._wait_for_lock("db", "tbl", lockid, catalog._client)
13211321
assert catalog._client.check_lock.call_count == 5

0 commit comments

Comments
 (0)