Skip to content

Commit c925cf0

Browse files
committed
xfail ZarrTrace tests when zarr >= 3 is installed
1 parent 2059c41 commit c925cf0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/backends/test_zarr.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import itertools
1515

1616
from dataclasses import asdict
17+
from importlib.metadata import version
1718

1819
import numpy as np
1920
import pytest
@@ -28,6 +29,16 @@
2829
from pymc.step_methods.state import equal_dataclass_values
2930
from tests.helpers import equal_sampling_states
3031

32+
# PyMC's `ZarrTrace` still uses zarr 2 module-level APIs (`zarr.TempStore`,
33+
# `zarr.MemoryStore`) and the removed `synchronizer` kwarg. When a dependency
34+
# (e.g., installed nutpie) pulls in zarr>=3, the whole suite fails on import /
35+
# attribute access. xfail the module in that case until the port lands.
36+
pytestmark = pytest.mark.xfail(
37+
int(version("zarr").split(".", 1)[0]) >= 3,
38+
reason="PyMC's ZarrTrace is not yet ported to zarr 3",
39+
strict=False,
40+
)
41+
3142

3243
@pytest.fixture(scope="module")
3344
def model():

0 commit comments

Comments
 (0)