Example #1
0
class MrppTests(TestCase):
    """Tests for the Mrpp class."""

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

        self.mrpp_results_str1 = mrpp_results_str1.split('\n')
        self.mrpp_results_str2 = mrpp_results_str2.split('\n')

    def test_parse(self):
        """Test parsing mrpp results file."""
        obs = self.inst.parse(self.mrpp_results_str1)
        self.assertFloatEqual(obs, (0.07567, 0.01))

        # Invalid format.
        self.assertRaises(UnparsableFileError, self.inst.parse,
                          self.mrpp_results_str2)
Example #2
0
    def setUp(self):
        """Define some sample data that will be used by the tests."""
        self.inst = Mrpp()

        self.mrpp_results_str1 = mrpp_results_str1.split('\n')
        self.mrpp_results_str2 = mrpp_results_str2.split('\n')