From 3ee9623256052e8b0bb559a9c54e361b95be01f2 Mon Sep 17 00:00:00 2001 From: nsheff Date: Wed, 14 Feb 2024 15:03:35 -0500 Subject: [PATCH] finish package rename --- tests/conftest.py | 2 +- tests/test_seqcol.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index d8479b2..129ff0b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -3,7 +3,7 @@ import os import pytest import oyaml as yaml -from seqcol.const import _schema_path +from refget.const import _schema_path def ly(n, data_path): diff --git a/tests/test_seqcol.py b/tests/test_seqcol.py index f74a9ce..85555f9 100644 --- a/tests/test_seqcol.py +++ b/tests/test_seqcol.py @@ -1,7 +1,7 @@ import json import os import pytest -import seqcol +import refget # from seqcol import SeqColHenge, validate_seqcol, compare # from seqcol.const import * @@ -32,13 +32,13 @@ def test_no_schemas_required(self): In contrast to the generic Henge object, SeqColHenge does not require schemas as input, they are predefined in the constructor """ - assert isinstance(seqcol.SeqColHenge(database={}), seqcol.SeqColHenge) + assert isinstance(refget.SeqColHenge(database={}), refget.SeqColHenge) class TestFastaInserting: @pytest.mark.parametrize("fasta_name", DEMO_FILES) def test_fasta_loading_works(self, fasta_name, fa_root): - scc = seqcol.SeqColHenge(database={}) + scc = refget.SeqColHenge(database={}) f = os.path.join(fa_root, fasta_name) print("Fasta file to be loaded: {}".format(f)) res = scc.load_fasta(f) @@ -48,7 +48,7 @@ def test_fasta_loading_works(self, fasta_name, fa_root): class TestRetrieval: @pytest.mark.parametrize("fasta_name", DEMO_FILES) def test_retrieval_works(self, fasta_name, fa_root): - scc = seqcol.SeqColHenge(database={}) + scc = refget.SeqColHenge(database={}) f = os.path.join(fa_root, fasta_name) print("Fasta file to be loaded: {}".format(f)) d, asds = scc.load_fasta(f) @@ -60,12 +60,12 @@ def test_retrieval_works(self, fasta_name, fa_root): def check_comparison(fasta1, fasta2, expected_comparison): print(f"Comparison: Fasta1: {fasta1} vs Fasta2: {fasta2}. Expected: {expected_comparison}") - scc = seqcol.SeqColHenge(database={}) + scc = refget.SeqColHenge(database={}) d = scc.load_fasta_from_filepath(fasta1) d2 = scc.load_fasta_from_filepath(fasta2) with open(expected_comparison) as fp: correct_compare_response = json.load(fp) - proposed_compare_response = seqcol.compare_seqcols(d["SCAS"], d2["SCAS"]) + proposed_compare_response = refget.compare_seqcols(d["SCAS"], d2["SCAS"]) print( json.dumps( proposed_compare_response, @@ -115,10 +115,10 @@ class TestValidate: @pytest.mark.parametrize(["seqcol_obj"], [[seqcol_obj]]) def test_validate(self, seqcol_obj): - is_valid = seqcol.validate_seqcol(seqcol_obj) + is_valid = refget.validate_seqcol(seqcol_obj) assert is_valid @pytest.mark.parametrize(["seqcol_obj"], [[bad_seqcol]]) def test_failure(self, seqcol_obj): with pytest.raises(Exception): - seqcol.validate_seqcol(seqcol_obj) + refget.validate_seqcol(seqcol_obj)