def test_make_fna(self): """test_make_fna should make fasta file as expected""" fna_fp = os.path.join(self.sff_dir, 'test.fna') fna_gz_fp = os.path.join(self.gz_sff_dir, 'test_gz.fna') make_fna(self.sff_fp, fna_fp) make_fna(self.sff_gz_fp, fna_gz_fp) self.assertEqual(open(fna_fp).read(), fna_txt) self.assertEqual(open(fna_gz_fp).read(), fna_txt)
def test_make_fna(self): """test_make_fna should make fasta file as expected""" make_fna(self.sff_fp) expected_fp = os.path.join(self.sff_dir, 'test.fna') observed = open(expected_fp).read() expected = ( '>FA6P1OK01CGMHQ length=48 xy=0892_1356 region=1 run=R_2008_05_28_17_11_38_\n' 'ATCTGAGCTGGGTCATAGCTGCCTCCGTAGGAGGTGCCTCCCTACGGC\n' ) self.assertEqual(observed, expected)