Beispiel #1
0
 def test_more_seqs_than_available(self):
     """
     Specifying more sequences than are in input records should return
     them all
     """
     result = list(transform.head(self.sequences, 10000))
     self.assertEqual(self.sequences, result)
Beispiel #2
0
 def test_more_seqs_than_available(self):
     """
     Specifying more sequences than are in input records should return
     them all
     """
     result = list(transform.head(self.sequences, 10000))
     self.assertEqual(self.sequences, result)
Beispiel #3
0
 def test_values(self):
     """
     Try specifying some values.
     """
     for h in xrange(len(self.sequences) + 1):
         result = list(transform.head(self.sequences, h))
         self.assertEqual(h, len(result))
         self.assertEqual(self.sequences[:h], result)
Beispiel #4
0
 def test_values(self):
     """
     Try specifying some values.
     """
     for h in xrange(len(self.sequences) + 1):
         result = list(transform.head(self.sequences, h))
         self.assertEqual(h, len(result))
         self.assertEqual(self.sequences[:h], result)
Beispiel #5
0
 def test_minus_zero(self):
     """
     Test that -0 returns all sequences
     """
     result = list(transform.head(self.sequences, '-0'))
     self.assertEqual([s.id for s in self.sequences],
                      [r.id for r in result])
     self.assertEqual([str(s.seq) for s in self.sequences],
                      [str(r.seq) for r in result])
Beispiel #6
0
 def test_more_seqs_than_available(self):
     """
     Specifying more sequences than are in input records should return
     them all
     """
     result = list(transform.head(self.sequences, '10000'))
     self.assertEqual([s.id for s in self.sequences],
                      [r.id for r in result])
     self.assertEqual([str(s.seq) for s in self.sequences],
                      [str(r.seq) for r in result])
Beispiel #7
0
 def test_minus_values(self):
     """
     Try specifying some minus values.
     """
     for h in xrange(1, len(self.sequences) + 1):
         result = list(transform.head(self.sequences, str(-h)))
         self.assertEqual(h, len(self.sequences) - len(result))
         self.assertEqual([s.id for s in self.sequences[:-h]],
                          [r.id for r in result])
         self.assertEqual([str(s.seq) for s in self.sequences[:-h]],
                          [str(r.seq) for r in result])
Beispiel #8
0
 def test_zero(self):
     result = list(transform.head(self.sequences, 0))
     self.assertEqual([], result)
Beispiel #9
0
 def test_zero(self):
     result = list(transform.head(self.sequences, '0'))
     self.assertEqual([], result)