def test_custom_inverse_reset():
 class TestModel(Model, ):
  inputs = ()
  outputs = (u'y',)
  @property
  def inverse(self):
   return models.Shift()
  @staticmethod
  def evaluate():
   return 0
 m = TestModel()
 assert isinstance(m.inverse, models.Shift)
 m.inverse = models.Scale()
 assert isinstance(m.inverse, models.Scale)
 del m.inverse
 assert isinstance(m.inverse, models.Shift)

def test_custom_inverse_reset ( ) : class TestModel ( Model , ) : inputs = ( ) outputs = ( u'y' , ) @ property def inverse ( self ) : return models . Shift ( ) @ staticmethod def evaluate ( ) : return 0 m = TestModel ( ) assert isinstance ( m . inverse , models . Shift ) m . inverse = models . Scale ( ) assert isinstance ( m . inverse , models . Scale ) del m . inverse assert isinstance ( m . inverse , models . Shift )
test resetting a custom inverse to the models default inverse .