Skip to content

Commit

Permalink
Add tests for Cigar serializations
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Sep 20, 2024
1 parent 35ff4ec commit 785e1ae
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,22 @@ def test_cigar_coerce():
assert basic == Cigar.coerce(tuple(lst))


def test_cigar_serialization():
hit = Cigar.parse("3M")
assert str(hit) == "3M"

hit = Cigar.parse("3M2I3D2M")
assert str(hit) == "3M2I3D2M"

hit = Cigar.parse("3M")
assert repr(hit) \
== "Cigar('3M')"

hit = Cigar.parse("3M2I3D2M")
assert repr(hit) \
== "Cigar('3M2I3D2M')"


def test_cigar_hit_translate():
hit = parsed_hit("3M@1->1")
assert hit == hit
Expand Down

0 comments on commit 785e1ae

Please sign in to comment.