Ejemplo n.º 1
0
    def test_genbank_to_rna(self):
        seq, md, imd, constructor = self.single_rna
        obs = _genbank_to_rna(self.single_rna_fp)
        exp = constructor(seq, metadata=md,
                          lowercase=True, interval_metadata=imd)

        self.assertEqual(exp, obs)
Ejemplo n.º 2
0
 def test_genbank_to_rna(self):
     seq, md, pmd, constructor = self.single_rna
     obs = _genbank_to_rna(self.single_rna_fp)
     exp = constructor(seq,
                       metadata=md,
                       lowercase=True,
                       positional_metadata=pmd)
     self.assertEqual(exp, obs)
Ejemplo n.º 3
0
    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)
Ejemplo n.º 4
0
    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)