def test_reverse_transform(self): """Test the ``Constraint.reverse_transform`` method. It is an identity method for completion, to be optionally overwritten by subclasses. The ``Constraint.reverse_transform`` method is expected to: - Return the input data unmodified. Input: - Anything Output: - Input """ # Run instance = Constraint(handling_strategy='transform') output = instance.reverse_transform('input') # Assert assert output == 'input'
def test_reverse_transform(self): """Test the ``Constraint.reverse_transform`` method. It is an identity method for completion, to be optionally overwritten by subclasses. The ``Constraint.reverse_transform`` method is expected to: - Return a copy of the input data. Input: - Anything Output: - Input """ # Setup instance = Constraint() data = pd.DataFrame() # Run output = instance.reverse_transform(data) # Assert pd.testing.assert_frame_equal(output, pd.DataFrame()) assert id(output) != id(data)