From 6fc8d539799e203feff11b791f8744ddec269f5e Mon Sep 17 00:00:00 2001 From: Tom White Date: Wed, 2 Nov 2022 15:47:44 +0000 Subject: [PATCH] Fix scikit-allel roundtrip test when contig lengths found --- sgkit/tests/io/vcf/test_vcf_roundtrip.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sgkit/tests/io/vcf/test_vcf_roundtrip.py b/sgkit/tests/io/vcf/test_vcf_roundtrip.py index 7f591857c..e0c628688 100644 --- a/sgkit/tests/io/vcf/test_vcf_roundtrip.py +++ b/sgkit/tests/io/vcf/test_vcf_roundtrip.py @@ -199,6 +199,9 @@ def test_all_fields( assert allel_ds_contigs <= sg_ds_contigs del allel_ds.attrs["contigs"] del sg_ds.attrs["contigs"] + # scikit-allel doesn't store contig lengths + if "contig_lengths" in sg_ds.attrs: + del sg_ds.attrs["contig_lengths"] if allel_ds_contigs < sg_ds_contigs: # variant_contig variables are not comparable, so remove them before comparison