Skip to content

Commit

Permalink
Merge pull request #371 from ChristopherBradley/366
Browse files Browse the repository at this point in the history
Testing get_slice on nested annotations
  • Loading branch information
GavinHuttley committed Nov 11, 2019
2 parents 8dbe5bc + f25cff9 commit 578c619
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_core/test_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class FeaturesTest(TestCase):

def setUp(self):
# A Sequence with a couple of exons on it.

self.s = DNA.make_seq(
"AAGAAGAAGACCCCCAAAAAAAAAATTTTTTTTTTAAAAAAAAAAAAA", name="Orig"
)
Expand Down Expand Up @@ -625,6 +624,11 @@ def test_roundtrip_variable(self):
# annoyingly, comes back as list of lists
self.assertEqual(got.xxy_list, [[list(xx), y] for xx, y in y_valued.xxy_list])

def test_nested_get_slice(self):
"""check the get_slice method works on nested annotations"""
nested_feature = self.exon1.add_feature("repeat", "C", [(2, 5)])
self.assertEqual(nested_feature.get_slice(), "CCC")


if __name__ == "__main__":
main()

0 comments on commit 578c619

Please sign in to comment.