Permalink
Browse files

test_SeqUtils.py: add tests for GC(), seq1() and seq3().

  • Loading branch information...
1 parent b42db71 commit cc90569c2ae7bb164afd8eae6882d5611f0fdb31 @cbrueffer cbrueffer committed with peterjc Dec 28, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 Tests/test_SeqUtils.py
View
@@ -118,6 +118,18 @@ def test_checksum(self):
#Finally check it works with a MutableSeq object
self.assertEqual(value, checksum(MutableSeq(seq_str, single_letter_alphabet)))
+ def test_GC(self):
+ seq = "ACGGGCTACCGTATAGGCAAGAGATGATGCCC"
+ self.assertEqual(GC(seq), 56.25)
+
+ def test_seq1_seq3(self):
+ s3 = "MetAlaTyrtrpcysthrLYSLEUILEGlYPrOGlNaSnaLapRoTyRLySSeRHisTrpLysThr"
+ s1 = "MAYWCTKLIGPQNAPYKSHWKT"
+ self.assertEqual(seq1(s3), s1)
+ self.assertEqual(seq3(s1).upper(), s3.upper())
+ self.assertEqual(seq1(seq3(s1)), s1)
+ self.assertEqual(seq3(seq1(s3)).upper(), s3.upper())
+
if __name__ == "__main__":
runner = unittest.TextTestRunner(verbosity=2)

0 comments on commit cc90569

Please sign in to comment.