def test_inspect_function_params_slope_noise(self):
        A = TransferMechanism()
        B = TransferMechanism()
        assert A.function.slope == 1.0
        assert B.function.slope == 1.0
        assert A.mod_slope == [1.0]
        assert B.mod_slope == [1.0]

        assert A.noise == 0.0
        assert B.noise == 0.0
        assert A.mod_noise == 0.0
        assert B.mod_noise == 0.0

        A.function.slope = 0.2

        assert A.function.slope == 0.2
        assert B.function.slope == 1.0
        assert A.mod_slope == [1.0]
        assert B.mod_slope == [1.0]

        A.noise = 0.5

        assert A.noise == 0.5
        assert B.noise == 0.0
        assert A.mod_noise == 0.0
        assert B.mod_noise == 0.0

        B.function.slope = 0.7

        assert A.function.slope == 0.2
        assert B.function.slope == 0.7
        assert A.mod_slope == [1.0]
        assert B.mod_slope == [1.0]

        B.noise = 0.6

        assert A.noise == 0.5
        assert B.noise == 0.6
        assert A.mod_noise == 0.0
        assert B.mod_noise == 0.0

        A.execute(1.0)
        assert A.mod_slope == [0.2]

        B.execute(1.0)

        assert A.function.slope == 0.2
        assert B.function.slope == 0.7
        assert A.mod_slope == [0.2]
        assert B.mod_slope == [0.7]

        assert A.noise == 0.5
        assert B.noise == 0.6
        assert A.mod_noise == 0.5
        assert B.mod_noise == 0.6
    def test_configurable_params(self):
        old_value = 0.2
        new_value = 0.7
        T = TransferMechanism(function=Linear(slope=old_value,
                                              intercept=old_value),
                              noise=old_value,
                              integration_rate=old_value)

        # SLOPE - - - - - - - -

        assert np.allclose(T.user_params["function_params"]["slope"], old_value)
        assert np.allclose(T.function.slope, old_value)
        assert np.allclose(T.mod_slope, old_value)

        T.function.slope = new_value

        # KAM changed 3/2/18 --
        # function_params looks at ParameterPort value, so this will not update until next execution
        assert np.allclose(T.user_params["function_params"]["slope"], old_value)
        assert np.allclose(T.function.slope, new_value)
        assert np.allclose(T.mod_slope, old_value)

        # INTERCEPT - - - - - - - -

        assert np.allclose(T.user_params["function_params"]["intercept"], old_value)
        assert np.allclose(T.function.intercept, old_value)
        assert np.allclose(T.mod_intercept, old_value)

        T.function.intercept = new_value

        # KAM changed 3/2/18 --
        # function_params looks at ParameterPort value, so this will not update until next execution
        assert np.allclose(T.user_params["function_params"]["intercept"], old_value)
        assert np.allclose(T.function.intercept, new_value)
        assert np.allclose(T.mod_intercept, old_value)

        # SMOOTHING FACTOR - - - - - - - -

        assert np.allclose(T.user_params["integration_rate"], old_value)
        assert np.allclose(T.integration_rate, old_value)
        assert np.allclose(T.mod_integration_rate, old_value)

        T.integration_rate = new_value

        # KAM changed 3/2/18 --
        # function_params looks at ParameterPort value, so this will not update until next execution
        assert np.allclose(T.user_params["integration_rate"], old_value)
        assert np.allclose(T.integration_rate, new_value)
        assert np.allclose(T.mod_integration_rate, old_value)

        # NOISE - - - - - - - -

        assert np.allclose(T.user_params["noise"], old_value)
        assert np.allclose(T.noise, old_value)
        assert np.allclose(T.mod_noise, old_value)

        T.noise = new_value

        # KAM changed 3/2/18 --
        # function_params looks at ParameterPort value, so this will not update until next execution
        assert np.allclose(T.user_params["noise"], old_value)
        assert np.allclose(T.noise, new_value)
        assert np.allclose(T.mod_noise, old_value)

        T.execute(1.0)

        assert np.allclose(T.user_params["function_params"]["slope"], new_value)
        assert np.allclose(T.function.slope, new_value)
        assert np.allclose(T.mod_slope, new_value)

        assert np.allclose(T.user_params["function_params"]["intercept"], new_value)
        assert np.allclose(T.function.intercept, new_value)
        assert np.allclose(T.mod_intercept, new_value)

        assert np.allclose(T.user_params["integration_rate"], new_value)
        assert np.allclose(T.integration_rate, new_value)
        assert np.allclose(T.mod_integration_rate, new_value)

        assert np.allclose(T.user_params["noise"], new_value)
        assert np.allclose(T.noise, new_value)
        assert np.allclose(T.mod_noise, new_value)