@@ -360,12 +360,14 @@ def test_inspect(self, tmp_path):
360
360
for row in data :
361
361
assert "name" in row
362
362
363
- @pytest .mark .parametrize ("path" , [
364
- "tests/data/vcf/sample_missing_contig.vcf.gz" ,
365
- "tests/data/vcf/sample_missing_contig.bcf" ,
366
- "tests/data/vcf/sample_missing_contig_csi.vcf.gz" ]
367
- )
368
-
363
+ @pytest .mark .parametrize (
364
+ "path" ,
365
+ [
366
+ "tests/data/vcf/sample_missing_contig.vcf.gz" ,
367
+ "tests/data/vcf/sample_missing_contig.bcf" ,
368
+ "tests/data/vcf/sample_missing_contig_csi.vcf.gz" ,
369
+ ],
370
+ )
369
371
def test_missing_contig_vcf (self , ds , tmp_path , path ):
370
372
# 20 has been removed from the header. The datasets is the same,
371
373
# but the ordering of contigs has been permuted. This seems to be the
@@ -772,17 +774,19 @@ def test_info_string2(self, ds):
772
774
773
775
774
776
class TestSplitFileErrors :
775
-
776
777
def test_entirely_incompatible (self , tmp_path ):
777
778
path = "tests/data/vcf/"
778
779
with pytest .raises (ValueError , match = "Incompatible" ):
779
- vcf .explode_init (tmp_path , [path + "sample.vcf.gz" , path + "1kg_2020_chrM.bcf" ])
780
+ vcf .explode_init (
781
+ tmp_path , [path + "sample.vcf.gz" , path + "1kg_2020_chrM.bcf" ]
782
+ )
780
783
781
784
def test_duplicate_paths (self , tmp_path ):
782
785
path = "tests/data/vcf/"
783
786
with pytest .raises (ValueError , match = "Duplicate" ):
784
787
vcf .explode_init (tmp_path , [path + "sample.vcf.gz" ] * 2 )
785
788
789
+
786
790
@pytest .mark .parametrize (
787
791
"name" ,
788
792
[
@@ -835,13 +839,13 @@ def test_split_explode(tmp_path):
835
839
vcf .explode_partition (out , j )
836
840
vcf .explode_finalise (out )
837
841
pcvcf = vcf .IntermediateColumnarFormat (out )
838
- assert pcvcf .columns [' POS' ].vcf_field .summary .asdict () == {
839
- ' num_chunks' : 3 ,
840
- ' compressed_size' : 630 ,
841
- ' uncompressed_size' : 1008 ,
842
- ' max_number' : 1 ,
843
- ' max_value' : 1235237 ,
844
- ' min_value' : 10
842
+ assert pcvcf .columns [" POS" ].vcf_field .summary .asdict () == {
843
+ " num_chunks" : 3 ,
844
+ " compressed_size" : 630 ,
845
+ " uncompressed_size" : 1008 ,
846
+ " max_number" : 1 ,
847
+ " max_value" : 1235237 ,
848
+ " min_value" : 10 ,
845
849
}
846
850
vcf .encode (out , tmp_path / "test.zarr" )
847
851
vcf .validate ("tests/data/vcf/sample.vcf.gz" , tmp_path / "test.zarr" )
@@ -851,5 +855,3 @@ def test_missing_filter(tmp_path):
851
855
path = "tests/data/vcf/sample_missing_filter.vcf.gz"
852
856
with pytest .raises (ValueError , match = "Filter 'q10' was not defined in the header" ):
853
857
vcf .convert ([path ], tmp_path )
854
-
855
-
0 commit comments