Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
willdumm committed Dec 21, 2024
1 parent 99c1dd1 commit 95da9e3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/test_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
nt_idx_array_of_str,
nt_subs_indicator_tensor_of,
translate_sequences,
token_mask_of_aa_idxs,
aa_idx_tensor_of_str,
)


Expand All @@ -32,9 +34,15 @@ def test_token_replace():
nseq = nseq.replace(token, "N")
assert nseq == seq

# TODO implement these tests

def test_token_mask():
assert False
sample_aa_seq = "QYX^QC"
mask = token_mask_of_aa_idxs(aa_idx_tensor_of_str(sample_aa_seq))
for aa, mval in zip(sample_aa_seq, mask):
if aa in RESERVED_TOKENS:
assert mval
else:
assert not mval


def test_nucleotide_indices_of_codon():
Expand Down

0 comments on commit 95da9e3

Please sign in to comment.