コード例 #1
0
ファイル: test_util.py プロジェクト: Pratap5387/American-Gut
    def test_trim_fasta(self):
        infasta = StringIO(test_fasta)

        # Trim length 10
        expected = (">seq1\n"
                    "0123456789\n"
                    ">seq2\n"
                    "0123456789\n"
                    ">seq3\n"
                    "012345\n")
        outfasta = StringIO()
        trim_fasta(infasta, outfasta, 10)
        outfasta.seek(0)
        self.assertEqual(expected, outfasta.read())
コード例 #2
0
    def test_trim_fasta(self):
        infasta = StringIO(test_fasta)

        # Trim length 10
        expected = (">seq1\n"
                    "0123456789\n"
                    ">seq2\n"
                    "0123456789\n"
                    ">seq3\n"
                    "012345\n")
        outfasta = StringIO()
        trim_fasta(infasta, outfasta, 10)
        outfasta.seek(0)
        self.assertEqual(expected, outfasta.read())