Exemple #1
0
 def test_plus_zero(self):
     """
     Test that +0 returns all sequences
     """
     result = list(transform.tail(self.records, '+0'))
     self.assertEqual([s.id for s in self.records], [r.id for r in result])
     self.assertEqual([str(s.seq) for s in self.records],
                      [str(r.seq) for r in result])
 def test_plus_zero(self):
     """
     Test that +0 returns all sequences
     """
     result = list(transform.tail(self.records, '+0'))
     self.assertEqual([s.id for s in self.records],
                      [r.id for r in result])
     self.assertEqual([str(s.seq) for s in self.records],
                      [str(r.seq) for r in result])
Exemple #3
0
 def test_plus_values(self):
     """
     Try specifying some plus values.
     """
     for h in xrange(1, len(self.records) + 1):
         result = list(transform.tail(self.records, '+{}'.format(h)))
         self.assertEqual(len(self.records) + 1 - h, len(result))
         self.assertEqual([s.id for s in self.records[h-1:]],
                          [r.id for r in result])
         self.assertEqual([str(s.seq) for s in self.records[h-1:]],
                          [str(r.seq) for r in result])
 def _do_test(self, size):
     actual = list(transform.tail(self.records, size))
     expected = self.records[-size:]
     self.assertEqual([e.id for e in expected], [a.id for a in actual])
     self.assertEqual([str(e.seq) for e in expected], [str(a.seq) for a in actual])
Exemple #5
0
 def _do_test(self, size):
     actual = list(transform.tail(self.records, str(size)))
     expected = self.records[-size:]
     self.assertEqual([e.id for e in expected], [a.id for a in actual])
     self.assertEqual([str(e.seq) for e in expected], [str(a.seq) for a in actual])