pylabrobot.resources.ResourceStack.assign_child_resource#
- ResourceStack.assign_child_resource(resource)#
Assign a child resource to this resource.
Before the resource is assigned, all callbacks registered with
register_will_assign_resource_callback()
will be called. If any of these callbacks raises an exception, the resource will not be assigned.After the resource is assigned, all callbacks registered with
register_did_assign_resource_callback()
will be called.- Parameters:
resource – The resource to assign.
location – The location of the resource, relative to this resource.
reassign – If
False
, an error will be raised if the resource to be assigned is already assigned to this resource. Defaults toTrue
.