Example #1
0
 def setUp(self):
     self.empty = ProteinSequence('')
     self.p1 = ProteinSequence('GREG')
     self.p2 = ProteinSequence('PRTEINSEQNCE',
                               id="test-seq-2",
                               description="A test sequence")
     self.p3 = ProteinSequence('PROTEIN',
                               id="bad-seq-1",
                               description="Not a protein sequence")
Example #2
0
 def test_nondegenerates(self):
     exp = [ProteinSequence('AD'), ProteinSequence('AN')]
     # Sort based on sequence string, as order is not guaranteed.
     obs = sorted(ProteinSequence('AB').nondegenerates(), key=str)
     self.assertEqual(obs, exp)