Пример #1
0
 def test_genbank_to_protein(self):
     i = 0
     exp = self.multi[i]
     obs = _genbank_to_protein(self.multi_fp, seq_num=i+1)
     exp = Protein(exp[0], metadata=exp[1],
                   lowercase=True, interval_metadata=exp[2])
     self.assertEqual(exp, obs)
Пример #2
0
 def test_genbank_to_protein(self):
     i = 0
     exp = self.multi[i]
     obs = _genbank_to_protein(self.multi_fp, seq_num=i+1)
     exp = Protein(exp[0], metadata=exp[1],
                   lowercase=True, positional_metadata=exp[2])
     self.assertEqual(exp, obs)
Пример #3
0
    def test_roundtrip_protein(self):
        with io.StringIO() as fh:
            _protein_to_genbank(_genbank_to_protein(self.single_lower_fp), fh)
            obs = fh.getvalue()

        with open(self.single_lower_fp) as fh:
            exp = fh.read()

        self.assertEqual(obs, exp)
Пример #4
0
    def test_roundtrip_protein(self):
        with io.StringIO() as fh:
            _protein_to_genbank(_genbank_to_protein(self.single_lower_fp), fh)
            obs = fh.getvalue()

        with open(self.single_lower_fp) as fh:
            exp = fh.read()

        self.assertEqual(obs, exp)