示例#1
0
class QiimeStatMethodTests(TestCase):
    """Tests for the QiimeStatMethod class."""

    def setUp(self):
        """Define some sample data that will be used by the tests."""
        self.inst = QiimeStatMethod()

        self.anosim_results_str1 = anosim_results_str1.split('\n')
        self.anosim_results_str2 = anosim_results_str2.split('\n')

    def test_parse(self):
        """Test parsing QIIME stats results file."""
        obs = self.inst.parse(self.anosim_results_str1)
        self.assertFloatEqual(obs, (0.463253142506, 0.01))

        self.assertRaises(UnparsableLineError, self.inst.parse,
                          self.anosim_results_str2)
示例#2
0
    def setUp(self):
        """Define some sample data that will be used by the tests."""
        self.inst = QiimeStatMethod()

        self.anosim_results_str1 = anosim_results_str1.split('\n')
        self.anosim_results_str2 = anosim_results_str2.split('\n')