Skip to content

Commit

Permalink
Test get_exact_seq()
Browse files Browse the repository at this point in the history
  • Loading branch information
veghp committed Oct 23, 2020
1 parent 17eed1c commit 59de9c0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_polymera.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ def test_polymer():
with pytest.raises(ValueError):
polymera.Polymer(sequence, alphabet=polymera.bio.DNAAlphabet)

sequence = polymera.Sequence()
sequence.add_sequence_from_string("A,T|CC")
exact_seq = sequence.get_exact_seq(randomize=False)
assert type(exact_seq) == polymera.Sequence
assert exact_seq.to_string() == "ACC"
assert sequence.get_exact_seq(randomize=True).to_string() in ["ACC", "TCC"]

sequence = polymera.Sequence()
sequence.add_sequence_from_string("ATGAA,ATGCC|TATATTAGAAAAAA")
sequence.add_sequence_from_string("ATGAA,ATGCC")
Expand Down

0 comments on commit 59de9c0

Please sign in to comment.