예제 #1
0
 def test_indep_max(self, indep_max):
     """ Tests indep_max property behavior """
     # __init__ path
     FUT(RIVAR, RDVAR, indep_max=indep_max)
     # Managed attribute path
     obj = FUT(RIVAR, RDVAR)
     obj.indep_max = indep_max
     assert obj.indep_max == indep_max
예제 #2
0
 def test_indep_min_greater_than_indep_max_exceptions(self):
     """
     Test behavior when indep_min and indep_max are incongruous
     """
     # Assign indep_min first
     obj = FUT(RIVAR, RDVAR, indep_min=0.5)
     exmsg = 'Argument `indep_min` is greater than argument `indep_max`'
     APROP(obj, 'indep_max', 0, ValueError, exmsg)
     #with pytest.raises(ValueError) as excinfo:
     #    obj.indep_max = 0
     #assert GET_EXMSG(excinfo) == exmsg
     # Assign indep_max first
     obj = FUT(RIVAR, RDVAR)
     obj.indep_max = 40
     APROP(obj, 'indep_min', 50, ValueError, exmsg)