We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e19459 commit 52f0abcCopy full SHA for 52f0abc
1 file changed
tests/test_vcz.py
@@ -13,6 +13,10 @@
13
from bio2zarr import vcf as vcf_mod
14
from bio2zarr.zarr_utils import zarr_v3
15
16
+# In zarr-python v2 strings are stored as object arrays (O) with itemsize 8
17
+# In zarr-python v3 strings are stored as string arrays (T) with itemsize 16
18
+STRING_ITEMSIZE = 16 if zarr_v3() else 8
19
+
20
21
@pytest.fixture(scope="module")
22
def vcf_file():
@@ -292,9 +296,8 @@ class TestChunkNbytes:
292
296
("variant_position", 36), # 9 * 4
293
297
("variant_H2", 9),
294
298
("variant_AC", 18), # 9 * 2
295
- # Object fields have an itemsize of 8
- ("variant_AA", 72), # 9 * 8
- ("variant_allele", 9 * 4 * 8),
299
+ ("variant_AA", 9 * STRING_ITEMSIZE),
300
+ ("variant_allele", 9 * 4 * STRING_ITEMSIZE),
301
],
302
)
303
def test_example_schema(self, schema, field, value):
0 commit comments