def test_roundtrip_rna(self): with io.StringIO() as fh: _rna_to_genbank(_genbank_to_rna(self.single_rna_fp), fh) obs = fh.getvalue() with open(self.single_rna_fp) as fh: exp = fh.read() self.assertEqual(obs, exp)
def test_rna_to_genbank(self): with io.StringIO() as fh: seq, md, imd, constructor = self.single_rna obj = constructor(seq, md, interval_metadata=imd, lowercase=True) _rna_to_genbank(obj, fh) obs = fh.getvalue() with open(self.single_rna_fp) as fh: exp = fh.read() self.assertEqual(obs, exp)
def test_rna_to_genbank(self): fh = io.StringIO() seq, md, pmd, constructor = self.single_rna obj = constructor(seq, md, pmd, lowercase=True) _rna_to_genbank(obj, fh) obs = fh.getvalue() fh.close() with io.open(self.single_rna_fp) as fh: exp = fh.read() self.assertEqual(obs, exp)