Extend the python mussa interface.
[mussa.git] / py / test / TestSequence.py
index 5fcc36205aa0d1b04614c5ab08c96421ed9fc290..e9d816e2665f7e844d9e84a1e57d16035530107a 100644 (file)
@@ -16,6 +16,9 @@ class TestSequence(unittest.TestCase):
     self.failUnless(str(s) == seq_text)
     self.failUnless(str(s) == seq_text)
 
+    for i in range(len(seq_text)):
+      self.failUnlessEqual(s[i], seq_text[i])
+
   def testNames(self):
     seq_text = "AAGGCCTT"
     header_text = "hello"
@@ -29,14 +32,8 @@ class TestSequence(unittest.TestCase):
     self.failUnless(s.species == species)
 
   def testAnnotations(self):
-    annot = mussa.annot()
-    annot.begin = 0
-    annot.end = 10
-    annot.name = "foo"
-    annot.type = "utr"
-
     seq = mussa.Sequence("AAGGCCTTAATTGGCCTT")
-    seq.add_annotation(annot)
+    seq.add_annotation("foo", "utr", 0, 10)
 
   def notestFile(self):
     # remove no prefix once we have sequence loading from a stream