Skip to content

Commit

Permalink
finish package rename
Browse files Browse the repository at this point in the history
  • Loading branch information
nsheff committed Feb 14, 2024
1 parent c963619 commit 3ee9623
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
16 changes: 8 additions & 8 deletions tests/test_seqcol.py
Original file line number Diff line number Diff line change
@@ -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 *
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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,
Expand Down Expand Up @@ -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)

0 comments on commit 3ee9623

Please sign in to comment.