def _get_tip_rack_lw(self) -> labware.Labware:
     try:
         return labware.load_from_definition(
             self._tip_rack_definition,
             self._deck.position_for(TIP_RACK_SLOT))
     except Exception:
         raise ErrorExc(Error.BAD_DEF)
Exemple #2
0
 def _get_tip_rack_lw(self,
                      tip_rack_def: 'LabwareDefinition') -> labware.Labware:
     try:
         return labware.load_from_definition(
             tip_rack_def,
             self._deck.position_for(TIP_RACK_SLOT))
     except Exception:
         raise RobotServerError(definition=CalibrationError.BAD_LABWARE_DEF)
Exemple #3
0
def test_module_load_labware(module_name):
    labware_name = 'corning_96_wellplate_360ul_flat'
    labware_def = labware.get_labware_definition(labware_name)
    model = module_geometry.resolve_module_model(module_name)
    mod = module_geometry.load_module(model, Location(Point(0, 0, 0), 'test'))
    old_z = mod.highest_z
    lw = labware.load_from_definition(labware_def, mod.location)
    mod.add_labware(lw)
    assert mod.labware == lw
    assert mod.highest_z ==\
        (mod.location.point.z
         + labware_def['dimensions']['zDimension']
         + mod._over_labware)
    with pytest.raises(AssertionError):
        mod.add_labware(lw)
    mod.reset_labware()
    assert mod.labware is None
    assert mod.highest_z == old_z
Exemple #4
0
def test_module_load_labware():
    module_names = ['tempdeck', 'magdeck']
    labware_name = 'corning_96_wellplate_360ul_flat'
    labware_def = labware.get_labware_definition(labware_name)
    for name in module_names:
        mod = labware.load_module(name, Location(Point(0, 0, 0), 'test'))
        old_z = mod.highest_z
        lw = labware.load_from_definition(labware_def, mod.location)
        mod.add_labware(lw)
        assert mod.labware == lw
        assert mod.highest_z ==\
            (mod.location.point.z
             + labware_def['dimensions']['zDimension']
             + mod._over_labware)
        with pytest.raises(AssertionError):
            mod.add_labware(lw)
        mod.reset_labware()
        assert mod.labware is None
        assert mod.highest_z == old_z