def test_pos2neg(self): T0 = -12.0 T1 = +5.0 dT = -17.0 grad = model(T0, T1) self.assertEqual(grad, dT, "Gradient should be equal to %f. Got %f instead" % (dT, grad))
def test_pos2pos_down(self): T0 = +3.0 T1 = +6.0 dT = -3.0 grad = model(T0, T1) self.assertEqual(grad, dT, "Gradient should be equal to %f. Got %f instead" % (dT, grad))
def test_neg2pos(self): T0 = +2.0 T1 = -5.0 dT = +7.0 grad = model(T0, T1) self.assertEqual(grad, dT, "Gradient should be equal to %f. Got %f instead" % (dT, grad))
def test_neg2neg_up(self): T0 = -2.0 T1 = -6.0 dT = +4.0 grad = model(T0, T1) self.assertEqual(grad, dT, "Gradient should be equal to %f. Got %f instead" % (dT, grad))