Пример #1
0
 def test_yeast_model_raises(self):
     with self.assertRaises(YeastException) as ctx:
         YeastModel(u"not an allowed method")
     self.assertEquals(
         str(ctx.exception),
         u"Method 'not an allowed method' not allowed for yeast model",
     )  # noqa
Пример #2
0
class TestYeastModel(unittest.TestCase):

    def setUp(self):
        self.yeast_model = YeastModel(u'stir plate')

    def test_yeast_model_raises(self):
        with self.assertRaises(Exception):
            YeastModel(u'not an allowed method')

    def test_get_growth_rate(self):
        inoculation_rate = 6.17
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_growth_rate(inoculation_rate)

    def test_get_inoculation_rate(self):
        growth_rate = 4.44
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_inoculation_rate(growth_rate)
class TestYeastModel(unittest.TestCase):

    def setUp(self):
        self.yeast_model = YeastModel(u'stir plate')

    def test_yeast_model_raises(self):
        with self.assertRaises(YeastException) as ctx:
            YeastModel(u'not an allowed method')
        self.assertEquals(str(ctx.exception),
                          u"Method 'not an allowed method' not allowed for yeast model")  # noqa

    def test_get_growth_rate(self):
        inoculation_rate = 6.17
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_growth_rate(inoculation_rate)

    def test_get_inoculation_rate(self):
        growth_rate = 4.44
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_inoculation_rate(growth_rate)
Пример #4
0
class TestYeastModel(unittest.TestCase):
    def setUp(self):
        self.yeast_model = YeastModel(u"stir plate")

    def test_yeast_model_raises(self):
        with self.assertRaises(YeastException) as ctx:
            YeastModel(u"not an allowed method")
        self.assertEquals(
            str(ctx.exception),
            u"Method 'not an allowed method' not allowed for yeast model",
        )  # noqa

    def test_get_growth_rate(self):
        inoculation_rate = 6.17
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_growth_rate(inoculation_rate)

    def test_get_inoculation_rate(self):
        growth_rate = 4.44
        with self.assertRaises(NotImplementedError):
            self.yeast_model.get_inoculation_rate(growth_rate)
Пример #5
0
 def setUp(self):
     self.yeast_model = YeastModel(u'stir plate')
Пример #6
0
 def setUp(self):
     self.yeast_model = YeastModel(u"stir plate")