Example #1
0
 def test_iterate(self, fasta_filename):
     # Check the indexed fasta file's iterable matches that of the unindexed
     # fasta file.
     indexed_fasta_reader = fasta.IndexedFastaReader(
         test_utils.genomics_core_testdata(fasta_filename))
     unindexed_fasta_reader = fasta.UnindexedFastaReader(
         test_utils.genomics_core_testdata(fasta_filename))
     self.assertEqual(list(indexed_fasta_reader.iterate()),
                      list(unindexed_fasta_reader.iterate()))
Example #2
0
 def test_query(self):
     unindexed_fasta_reader = fasta.UnindexedFastaReader(
         test_utils.genomics_core_testdata('unindexed.fasta'))
     with self.assertRaises(NotImplementedError):
         unindexed_fasta_reader.query(ranges.make_range('chrM', 1, 5))