Skip to content

Commit 6cd253c

Browse files
authored
Merge branch 'master' into fix-plotly-warnings
2 parents 6709f7b + 71c0b23 commit 6cd253c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/anoph/test_genome_features.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ def test_plot_genes_with_gene_labels(fixture, api: AnophelesGenomeFeaturesData):
169169
# For each contig in the fixture...
170170
for contig in fixture.contigs:
171171
# Get the genes for this contig.
172-
genes_df = api.genome_features(region=contig).query("type == 'gene'")
172+
genes_df = api.genome_features(region=contig).query(
173+
f"type == '{api._gff_gene_type}'"
174+
)
173175

174176
# If there are no genes, we cannot label them.
175177
if not genes_df.empty:
@@ -181,7 +183,10 @@ def test_plot_genes_with_gene_labels(fixture, api: AnophelesGenomeFeaturesData):
181183

182184
# Put the random gene "ID" and its "Name" in a dictionary.
183185
random_gene_labels = dict(
184-
zip(random_sample_genes_df["ID"], random_sample_genes_df["Name"])
186+
zip(
187+
random_sample_genes_df["ID"],
188+
random_sample_genes_df[api._gff_gene_name_attribute],
189+
)
185190
)
186191

187192
# Check that we get a Bokeh figure from plot_genes() with these gene_labels.

0 commit comments

Comments
 (0)