Skip to content

Commit 21c4ba3

Browse files
committed
Add failing test for transcript query consistency
1 parent 31b379b commit 21c4ba3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/sources/test_uta_database.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,18 @@ async def test_get_transcripts_from_gene(test_db):
284284
assert len(resp) == 0
285285

286286

287+
@pytest.mark.asyncio
288+
async def test_get_consistent_transcripts_from_gene(test_db):
289+
gene = "MIR9-1HG"
290+
results = await test_db.get_transcripts(gene=gene)
291+
expected = list(results["tx_ac"])
292+
# Do the same query 30 times and ensure it gives consistent results each time
293+
for _i in range(30):
294+
results = await test_db.get_transcripts(gene=gene)
295+
actual = list(results["tx_ac"])
296+
assert actual == expected
297+
298+
287299
@pytest.mark.asyncio
288300
async def test_get_chr_assembly(test_db):
289301
"""Test that get_chr_assembly works correctly."""

0 commit comments

Comments
 (0)