Skip to content

Commit

Permalink
Use Tests/GenBank/cor6_6.gb.bgz in test_bgzf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Oct 16, 2012
1 parent 5b67231 commit 3ea4ea5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Tests/test_bgzf.py
Expand Up @@ -242,6 +242,10 @@ def test_random_example_fastq(self):
"""Check random access to Quality/example.fastq.bgz"""
self.check_random("Quality/example.fastq.bgz")

def test_random_example_cor6(self):
"""Check random access to GenBank/cor6_6.gb.bgz"""
self.check_random("GenBank/cor6_6.gb.bgz")

def test_text_example_fastq(self):
"""Check text mode access to Quality/example.fastq.bgz"""
self.check_text("Quality/example.fastq", "Quality/example.fastq.bgz")
Expand All @@ -251,6 +255,11 @@ def test_iter_example_fastq(self):
self.check_by_line("Quality/example.fastq", "Quality/example.fastq.bgz")
self.check_by_char("Quality/example.fastq", "Quality/example.fastq.bgz")

def test_iter_example_cor6(self):
"""Check iteration over GenBank/cor6_6.gb.bgz"""
self.check_by_line("GenBank/cor6_6.gb", "GenBank/cor6_6.gb.bgz")
self.check_by_char("GenBank/cor6_6.gb", "GenBank/cor6_6.gb.bgz")

def test_iter_example_gb(self):
"""Check iteration over GenBank/NC_000932.gb.bgz"""
self.check_by_line("GenBank/NC_000932.gb", "GenBank/NC_000932.gb.bgz")
Expand Down Expand Up @@ -278,6 +287,18 @@ def test_example_fastq(self):
self.rewrite("Quality/example.fastq.gz", temp_file)
self.check_blocks("Quality/example.fastq.bgz", temp_file)

def test_example_gb(self):
"""Reproduce BGZF compression for NC_000932 GenBank file"""
temp_file = self.temp_file
self.rewrite("GenBank/NC_000932.gb.bgz", temp_file)
self.check_blocks("GenBank/NC_000932.gb.bgz", temp_file)

def test_example_cor6(self):
"""Reproduce BGZF compression for cor6_6.gb GenBank file"""
temp_file = self.temp_file
self.rewrite("GenBank/cor6_6.gb.bgz", temp_file)
self.check_blocks("GenBank/cor6_6.gb.bgz", temp_file)

if __name__ == "__main__":
runner = unittest.TextTestRunner(verbosity = 2)
unittest.main(testRunner=runner)

0 comments on commit 3ea4ea5

Please sign in to comment.