@@ -65,11 +65,13 @@ def test_encode(self):
65
65
show_progress = True ,
66
66
)
67
67
68
- def test_convert (self ):
68
+ def test_convert_vcf (self ):
69
69
runner = ct .CliRunner (mix_stderr = False )
70
70
with mock .patch ("bio2zarr.vcf.convert" ) as mocked :
71
71
result = runner .invoke (
72
- cli .vcf2zarr , ["convert" , "vcf_path" , "zarr_path" ], catch_exceptions = False
72
+ cli .vcf2zarr ,
73
+ ["convert" , "vcf_path" , "zarr_path" ],
74
+ catch_exceptions = False ,
73
75
)
74
76
assert result .exit_code == 0
75
77
assert len (result .stdout ) == 0
@@ -80,3 +82,38 @@ def test_convert(self):
80
82
worker_processes = 1 ,
81
83
show_progress = True ,
82
84
)
85
+
86
+ def test_validate (self ):
87
+ runner = ct .CliRunner (mix_stderr = False )
88
+ with mock .patch ("bio2zarr.vcf.validate" ) as mocked :
89
+ result = runner .invoke (
90
+ cli .vcf2zarr ,
91
+ ["validate" , "vcf_path" , "zarr_path" ],
92
+ catch_exceptions = False ,
93
+ )
94
+ assert result .exit_code == 0
95
+ assert len (result .stdout ) == 0
96
+ assert len (result .stderr ) == 0
97
+ mocked .assert_called_once_with (
98
+ "vcf_path" ,
99
+ "zarr_path" ,
100
+ show_progress = True ,
101
+ )
102
+
103
+ def test_convert_plink (self ):
104
+ runner = ct .CliRunner (mix_stderr = False )
105
+ with mock .patch ("bio2zarr.plink.convert" ) as mocked :
106
+ result = runner .invoke (
107
+ cli .plink2zarr , ["convert" , "in" , "out" ], catch_exceptions = False
108
+ )
109
+ assert result .exit_code == 0
110
+ assert len (result .stdout ) == 0
111
+ assert len (result .stderr ) == 0
112
+ mocked .assert_called_once_with (
113
+ "in" ,
114
+ "out" ,
115
+ worker_processes = 1 ,
116
+ chunk_width = None ,
117
+ chunk_length = None ,
118
+ show_progress = True ,
119
+ )
0 commit comments