Skip to content

Commit 70960ca

Browse files
committed
clear global cache for tests
1 parent 177dadc commit 70960ca

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/utils/test_manifest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,18 @@
3838
)
3939
from pyiceberg.partitioning import UNPARTITIONED_PARTITION_SPEC, PartitionField, PartitionSpec
4040
from pyiceberg.schema import Schema
41-
from pyiceberg.table.snapshots import Operation, Snapshot, Summary
41+
from pyiceberg.table.snapshots import Operation, Snapshot, Summary, _manifests
4242
from pyiceberg.transforms import IdentityTransform
4343
from pyiceberg.typedef import Record, TableVersion
4444
from pyiceberg.types import IntegerType, NestedField
4545

4646

47+
@pytest.fixture(autouse=True)
48+
def clear_global_manifests_cache() -> None:
49+
# Clear the global cache before each test
50+
_manifests.cache_clear() # type: ignore
51+
52+
4753
def _verify_metadata_with_fastavro(avro_file: str, expected_metadata: Dict[str, str]) -> None:
4854
with open(avro_file, "rb") as f:
4955
reader = fastavro.reader(f)

0 commit comments

Comments
 (0)