Skip to content

Commit 48f15b5

Browse files
Fix some tests and add some extra
1 parent c20eab3 commit 48f15b5

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

bio2zarr/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
help="Chunk size in the samples dimension",
3232
)
3333

34-
version = click.version_option(version=f"bio2zarr {provenance.__version__}")
34+
version = click.version_option(version=f"{provenance.__version__}")
3535

3636

3737
# Note: logging hasn't been implemented in the code at all, this is just

tests/test_cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def test_convert_plink(self):
127127
)
128128

129129

130+
130131
class TestVcfPartition:
131132
def test_num_parts(self):
132133
path = "tests/data/vcf/NA12878.prod.chr20snippet.g.vcf.gz"

tests/test_vcf_examples.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,19 @@ def test_worker_processes(self, ds, tmp_path, worker_processes):
334334
ds2 = sg.load_dataset(out)
335335
xt.assert_equal(ds, ds2)
336336

337+
def test_inspect(self, tmp_path):
338+
# TODO pretty weak test, we should be doing this better somewhere else
339+
out = tmp_path / "example.vcf.zarr"
340+
vcf.convert(
341+
[self.data_path],
342+
out,
343+
chunk_length=3,
344+
)
345+
data = vcf.inspect(out)
346+
assert len(data) > 0
347+
for row in data:
348+
assert "name" in row
349+
337350

338351
class Test1000G2020Example:
339352
data_path = "tests/data/vcf/1kg_2020_chrM.vcf.gz"

0 commit comments

Comments
 (0)