Exemplo n.º 1
0
 def test_format_otu_map(self):
     """format_otu_map functions as expected """
     actual = sorted(format_otu_map(self.otu_map1, ''))
     expected = sorted([
         '0\tseq1\tseq2\tseq5\n', '1\tseq3\tseq4\n', '2\tseq6\tseq7\tseq8\n'
     ])
     self.assertEqual(actual, expected)
Exemplo n.º 2
0
 def test_format_otu_map_prefix(self):
     """format_otu_map functions as expected w prefix"""
     actual = sorted(format_otu_map(self.otu_map1, 'my.otu.'))
     expected = sorted(['my.otu.0\tseq1\tseq2\tseq5\n',
                        'my.otu.1\tseq3\tseq4\n',
                        'my.otu.2\tseq6\tseq7\tseq8\n'])
     self.assertEqual(actual, expected)
Exemplo n.º 3
0
 def test_format_otu_map(self):
     """format_otu_map functions as expected """
     actual = sorted(format_otu_map(self.otu_map1, ''))
     expected = sorted(['0\tseq1\tseq2\tseq5\n',
                        '1\tseq3\tseq4\n',
                        '2\tseq6\tseq7\tseq8\n'])
     self.assertEqual(actual, expected)
Exemplo n.º 4
0
 def test_format_otu_map_error_on_bad_prefix(self):
     """format_otu_map functions as expected with bad prefix char"""
     self.assertRaises(ValueError, list,
                       format_otu_map(self.otu_map1, 'my_otu_'))
Exemplo n.º 5
0
 def test_format_otu_map_error_on_bad_prefix(self):
     """format_otu_map functions as expected with bad prefix char"""
     self.assertRaises(ValueError,list,
                       format_otu_map(self.otu_map1,'my_otu_'))
Exemplo n.º 6
0
 def test_format_otu_map(self):
     """format_otu_map functions as expected """
     actual = sorted(format_otu_map(self.otu_map1, ""))
     expected = sorted(["0\tseq1\tseq2\tseq5\n", "1\tseq3\tseq4\n", "2\tseq6\tseq7\tseq8\n"])
     self.assertEqual(actual, expected)