Skip to content

Commit e3488eb

Browse files
Update tests/anoph/test_genome_features.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent aa934f8 commit e3488eb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/anoph/test_genome_features.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,15 +326,18 @@ def test_canonical_transcript_single_transcript_gene(ag3_sim_api):
326326
f"type == '{ag3_sim_api._gff_gene_type}'"
327327
)
328328
# Find a gene with exactly one transcript if possible
329+
found_single_transcript_gene = False
329330
for gene_id in genes["ID"]:
330331
transcripts = ag3_sim_api.genome_feature_children(parent=gene_id)
331332
transcripts = transcripts[transcripts["type"] == "mRNA"]
332333
if len(transcripts) == 1:
333334
canonical = ag3_sim_api.canonical_transcript(gene_id)
334335
assert canonical == transcripts.iloc[0]["ID"]
336+
found_single_transcript_gene = True
335337
break
336338

337-
339+
if not found_single_transcript_gene:
340+
pytest.skip("No gene with exactly one transcript available in fixture")
338341
def test_canonical_transcript_calculation_correctness(ag3_sim_api):
339342
"""Test that the returned transcript actually has the highest exon length."""
340343
genes = ag3_sim_api.genome_features().query(

0 commit comments

Comments
 (0)