|
1 | 1 | import json |
| 2 | +import sys |
2 | 3 |
|
3 | 4 | import numpy as np |
4 | 5 | import PIL.Image |
5 | 6 | import pytest |
6 | 7 | import zarr |
7 | | -from ome_zarr.format import FormatV04, FormatV05 |
| 8 | +from ome_zarr.format import FormatV04 |
8 | 9 |
|
9 | 10 | import tiledb |
10 | 11 | from tests import assert_image_similarity, get_path, get_schema |
|
14 | 15 | from tiledb.bioimg.openslide import TileDBOpenSlide |
15 | 16 | from tiledb.filter import WebpFilter |
16 | 17 |
|
| 18 | +try: |
| 19 | + from ome_zarr.format import FormatV05 |
| 20 | + |
| 21 | + HAS_FORMAT_V05 = True |
| 22 | +except ImportError: |
| 23 | + FormatV05 = None |
| 24 | + |
| 25 | + |
| 26 | +REQUIRED_PYTHON_v3 = (3, 12) |
17 | 27 | schemas = (get_schema(2220, 2967), get_schema(387, 463), get_schema(1280, 431)) |
18 | 28 |
|
19 | 29 |
|
@@ -165,6 +175,12 @@ def test_ome_zarr_converter_rountrip_v2( |
165 | 175 | np.testing.assert_array_equal(input_array, output_array) |
166 | 176 |
|
167 | 177 |
|
| 178 | +# Condition to check if the current Python version is less than the required version |
| 179 | +# The test is skipped if the condition is True |
| 180 | +@pytest.mark.skipif( |
| 181 | + sys.version_info < REQUIRED_PYTHON_v3, |
| 182 | + reason=f"This test requires Python version {REQUIRED_PYTHON_v3[0]}.{REQUIRED_PYTHON_v3[1]} or higher.", |
| 183 | +) |
168 | 184 | @pytest.mark.parametrize("series_idx", [0, 1, 2]) |
169 | 185 | @pytest.mark.parametrize("preserve_axes", [False, True]) |
170 | 186 | @pytest.mark.parametrize("chunked,max_workers", [(False, 0), (True, 0), (True, 4)]) |
|
0 commit comments