Skip to content

Commit 2a12c40

Browse files
committed
skip zarr3 tests on older python versions
1 parent 9932a1d commit 2a12c40

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

.github/workflows/ci-linux.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
5656
- name: Install zarr-python
5757
shell: "bash -l {0}"
58+
if: ${{ matrix.python-version != '3.8' && matrix.python-version != '3.9' }}
5859
run: |
5960
conda activate env
6061
python -m pip install zarr==3.0.0a0

.github/workflows/ci-osx.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
5656
- name: Install zarr-python
5757
shell: "bash -l {0}"
58+
if: ${{ matrix.python-version != '3.8' && matrix.python-version != '3.9' }}
5859
run: |
5960
conda activate env
6061
python -m pip install zarr==3.0.0a0

.github/workflows/ci-windows.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
4848
- name: Install zarr-python
4949
shell: "bash -l {0}"
50+
if: ${{ matrix.python-version != '3.8' && matrix.python-version != '3.9' }}
5051
run: |
5152
conda activate env
5253
python -m pip install zarr==3.0.0a0

numcodecs/tests/test_zarr3.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@
44

55
import numpy as np
66
import pytest
7-
from zarr.codecs.registry import get_codec_class
8-
from zarr.array import Array
9-
from zarr.common import JSON
10-
from zarr.codecs import BytesCodec
7+
import sys
118

12-
from zarr.abc.store import Store
13-
from zarr.store import MemoryStore, StorePath
9+
try:
10+
from zarr.codecs.registry import get_codec_class
11+
from zarr.array import Array
12+
from zarr.common import JSON
13+
from zarr.codecs import BytesCodec
14+
from zarr.abc.store import Store
15+
from zarr.store import MemoryStore, StorePath
16+
17+
except ImportError:
18+
pass
19+
20+
21+
pytestmark = pytest.mark.skipif(
22+
sys.version_info < (3, 10), reason="zarr-python 3 requires Python 3.10 or higher"
23+
)
1424

1525

1626
@pytest.fixture

0 commit comments

Comments
 (0)