예제 #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)
예제 #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)
예제 #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)
예제 #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_'))
예제 #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_'))
예제 #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)