Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests for new numcodecs #275

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_icf.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ def test_empty_chunk_file(self, tmp_path):
with pytest.raises(RuntimeError, match="blosc"):
icf["POS"].values # noqa B018

# Chunk file is 195 long for numpy v1, and 193 long for v2
@pytest.mark.parametrize("length", [10, 100, 190, 192])
# Chunk file is 187 long
@pytest.mark.parametrize("length", [10, 100, 185])
def test_truncated_chunk_file(self, tmp_path, length):
icf_path = tmp_path / "icf"
vcf2zarr.explode(icf_path, [self.data_path])
Expand Down
7 changes: 5 additions & 2 deletions tests/test_vcf_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -959,9 +959,12 @@ def test_split_explode(tmp_path):
vcf2zarr.explode_partition(out, j)
vcf2zarr.explode_finalise(out)
pcvcf = vcf2zarr.IntermediateColumnarFormat(out)
assert pcvcf.fields["POS"].vcf_field.summary.asdict() == {
summary_d = pcvcf.fields["POS"].vcf_field.summary.asdict()
# The compressed size can vary with different numcodecs versions
assert summary_d["compressed_size"] == 571 or summary_d["compressed_size"] == 587
del summary_d["compressed_size"]
assert summary_d == {
"num_chunks": 3,
"compressed_size": 587,
"uncompressed_size": 1008,
"max_number": 1,
"max_value": 1235237,
Expand Down
Loading