def test_add_to_registry(
    CallableRegistry,  # noqa: N803
    PropertyRegistry,
    CachedPropertyRegistry,
    CallableParamRegistry,
    PropertyParamRegistry,
    CachedPropertyParamRegistry,
):
    """A member can be added to registries and accessed as per registry settings."""

    @CallableRegistry.registry()
    @PropertyRegistry.registry()
    @CachedPropertyRegistry.registry()
    @CallableParamRegistry.registry()
    @PropertyParamRegistry.registry()
    @CachedPropertyParamRegistry.registry()
    def member(pos=None, kwparam=None):
        return (pos, kwparam)

    callable_host = CallableRegistry()
    property_host = PropertyRegistry()
    cached_property_host = CachedPropertyRegistry()
    callable_param_host = CallableParamRegistry()
    property_param_host = PropertyParamRegistry()
    cached_property_param_host = CachedPropertyParamRegistry()

    assert callable_host.registry.member(1) == (callable_host, 1)
    assert property_host.registry.member == (property_host, None)
    assert cached_property_host.registry.member == (cached_property_host, None)
    assert callable_param_host.registry.member(1) == (1, callable_param_host)
    assert property_param_host.registry.member == (None, property_param_host)
    assert cached_property_param_host.registry.member == (
        None,
        cached_property_param_host,
    )