From b3075a7dec7ce14300f5f988425cec8e9d6d4d42 Mon Sep 17 00:00:00 2001 From: Jerome Kelleher Date: Tue, 28 Jan 2025 13:06:56 +0000 Subject: [PATCH] Switch to decompressed FASTA for simplicity --- tests/conftest.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index d71dbce..44b72b6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -30,9 +30,14 @@ def fx_alignments_fasta(fx_data_cache): @pytest.fixture -def fx_alignments_mafft_fasta(): +def fx_alignments_mafft_fasta(fx_data_cache): # This is bgzipped so we can access directly - return pathlib.Path("tests/data/alignments-mafft.fasta.gz") + cache_path = fx_data_cache / "alignments-mafft.fasta" + if not cache_path.exists(): + with gzip.open("tests/data/alignments-mafft.fasta.gz") as src: + with open(cache_path, "wb") as dest: + shutil.copyfileobj(src, dest) + return cache_path def encoded_alignments(path):