From 02859945578b0640fb103c4d41fa120fc92f27ed Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Thu, 2 May 2024 10:56:22 +0100 Subject: [PATCH] Fixup some tests --- bio2zarr/vcf.py | 3 +-- tests/test_core.py | 4 ++-- tests/test_vcf_examples.py | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bio2zarr/vcf.py b/bio2zarr/vcf.py index 9a7c28e..a2a090f 100644 --- a/bio2zarr/vcf.py +++ b/bio2zarr/vcf.py @@ -2056,8 +2056,7 @@ def get_max_encoding_memory(self): "call_genotype_mask", ] gt_mem = sum( - self.schema.fields[col].variant_chunk_nbytes - for col in encoded_together + self.schema.fields[col].variant_chunk_nbytes for col in encoded_together ) return max(max_encoding_mem, gt_mem) diff --git a/tests/test_core.py b/tests/test_core.py index bdb1e9f..312f145 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -188,8 +188,8 @@ def test_5_chunk_1(self, n, expected): # It *might* work in CI, but it may well not either, as it's # probably dependent on a whole bunch of things. Expect to fail # at some point. - ("tests/data", 4630726), - ("tests/data/vcf", 4618589), + ("tests/data", 4960266), + ("tests/data/vcf", 4948129), ("tests/data/vcf/sample.vcf.gz", 1089), ], ) diff --git a/tests/test_vcf_examples.py b/tests/test_vcf_examples.py index 40cc81f..07545b1 100644 --- a/tests/test_vcf_examples.py +++ b/tests/test_vcf_examples.py @@ -881,7 +881,7 @@ def test_split_explode(tmp_path): vcf.explode_partition(out, j) vcf.explode_finalise(out) pcvcf = vcf.IntermediateColumnarFormat(out) - assert pcvcf.columns["POS"].vcf_field.summary.asdict() == { + assert pcvcf.fields["POS"].vcf_field.summary.asdict() == { "num_chunks": 3, "compressed_size": 587, "uncompressed_size": 1008,