Skip to content

Commit

Permalink
test_SeqUtils.py: add tests for GC(), seq1() and seq3().
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrueffer authored and peterjc committed Jan 7, 2013
1 parent b42db71 commit cc90569
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/test_SeqUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cc90569

Please sign in to comment.