def METHOD_NAME(self):
    """Test that `serialize` will include full port namespace in exception message."""
    base_namespace = 'base'
    nested_namespace = 'some.nested.namespace'
    port_namespace = PortNamespace(base_namespace)
    port_namespace.create_port_namespace(nested_namespace)
    with pytest.raises(TypeError, match=f'.*{base_namespace}.*{nested_namespace}.*'):
        port_namespace.serialize({'some': {'nested': {'namespace': Dict()}}})