def test_get_name(robot):
    deck = Deck()
    slot = Slot()
    c = Container()
    deck.add(slot, 'A1', (0, 0, 0))
    red = Well(properties={'radius': 5})
    blue = Well(properties={'radius': 5})
    c.add(red, "Red", (0, 0, 0))
    c.add(blue, "Blue", (10, 0, 0))
    slot.add(c)

    assert red.get_name() == 'Red'
Example #2
0
def _parse_well_obj(well: Well):
    r_x, r_y, r_z = well._coordinates + well.bottom()[1]
    location, depth = well.get_name(), well.z_size()
    diameter = well.properties.get('diameter', None)
    volume = well.properties.get('total-liquid-volume', None)
    width, length = well.properties['width'], well.properties['length']
    return {
        'location': location,
        'x': r_x,
        'y': r_y,
        'z': r_z,
        'depth': depth,
        'volume': volume,
        'diameter': diameter,
        'length': length,
        'width': width
    }