From d9cc428572dceb834346a7e90c7ecf0ce63ee21e Mon Sep 17 00:00:00 2001 From: Rutger Vos Date: Thu, 29 Aug 2024 18:02:19 +0200 Subject: [PATCH] Instantiate empty sequence from FASTA file --- tests/test_taxonomy.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_taxonomy.py b/tests/test_taxonomy.py index 20dd3c0..11277e7 100644 --- a/tests/test_taxonomy.py +++ b/tests/test_taxonomy.py @@ -2,7 +2,7 @@ import requests import tempfile from pathlib import Path -from Bio import SeqRecord +from barcode_validator.alignment import parse_fasta from barcode_validator.config import Config from barcode_validator.taxonomy import read_bold_taxonomy, read_ncbi_taxonomy, get_tip_by_processid, run_localblast @@ -40,7 +40,10 @@ def test_get_tip_by_processid(bold_tree): def test_none_sequence_blast(): - seq = SeqRecord.SeqRecord('') + current_dir = Path(__file__).parent + example_fasta = current_dir.parent / 'examples' / 'empty_seq.fa' + result = list(parse_fasta(example_fasta)) + seq = result[0][1] con = Config() con.initialized = True con.config_data = {"constrain": "family"}