Skip to content

Commit 1d19be6

Browse files
committed
Fix tests
1 parent c79de73 commit 1d19be6

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

tests/test_query.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ def root(self):
131131
],
132132
)
133133
def test(self, root, query_format, expected_result):
134-
generator = QueryFormatGenerator(root, query_format)
134+
generator = QueryFormatGenerator(
135+
query_format,
136+
root["sample_id"][:],
137+
root["contig_id"][:],
138+
root["filter_id"][:],
139+
)
135140
chunk_data = next(variant_chunk_iter(root))
136141
result = "".join(generator(chunk_data))
137142
assert result == expected_result
@@ -166,7 +171,12 @@ def test(self, root, query_format, expected_result):
166171
)
167172
# fmt: on
168173
def test_call_mask(self, root, query_format, call_mask, expected_result):
169-
generator = QueryFormatGenerator(root, query_format)
174+
generator = QueryFormatGenerator(
175+
query_format,
176+
root["sample_id"][:],
177+
root["contig_id"][:],
178+
root["filter_id"][:],
179+
)
170180
chunk_data = next(variant_chunk_iter(root))
171181
if call_mask is not None:
172182
chunk_data["call_mask"] = call_mask
@@ -180,7 +190,12 @@ def test_call_mask(self, root, query_format, call_mask, expected_result):
180190
def test_with_parse_results(self, root, query_format, expected_result):
181191
parser = QueryFormatParser()
182192
parse_results = parser(query_format)
183-
generator = QueryFormatGenerator(root, parse_results)
193+
generator = QueryFormatGenerator(
194+
parse_results,
195+
root["sample_id"][:],
196+
root["contig_id"][:],
197+
root["filter_id"][:],
198+
)
184199
chunk_data = next(variant_chunk_iter(root))
185200
result = "".join(generator(chunk_data))
186201
assert result == expected_result

0 commit comments

Comments
 (0)