Skip to content

Commit

Permalink
Add tests for CigarHit.translate
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Sep 20, 2024
1 parent d77566f commit 764fad9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,3 +1047,14 @@ def test_cigar_coerce():
assert basic == Cigar.coerce(basic)
assert basic == Cigar.coerce(lst)
assert basic == Cigar.coerce(tuple(lst))


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

translated = hit.translate(3, 5)
assert hit != translated

translated_expected = parsed_hit("3M@6->4")
assert translated == translated_expected

0 comments on commit 764fad9

Please sign in to comment.