@@ -1303,12 +1303,84 @@ def test_touch_tip(
1303
1303
),
1304
1304
radius = 1.23 ,
1305
1305
speed = 7.89 ,
1306
+ mmFromEdge = None ,
1306
1307
)
1307
1308
),
1308
1309
mock_protocol_core .set_last_location (location = location , mount = Mount .LEFT ),
1309
1310
)
1310
1311
1311
1312
1313
+ def test_touch_tip_with_mm_from_edge (
1314
+ decoy : Decoy ,
1315
+ subject : InstrumentCore ,
1316
+ mock_engine_client : EngineClient ,
1317
+ mock_protocol_core : ProtocolCore ,
1318
+ ) -> None :
1319
+ """It should touch the tip to the edges of the well with mm_from_edge."""
1320
+ location = Location (point = Point (1 , 2 , 3 ), labware = None )
1321
+
1322
+ well_core = WellCore (
1323
+ name = "my cool well" , labware_id = "123abc" , engine_client = mock_engine_client
1324
+ )
1325
+ subject .touch_tip (
1326
+ location = location ,
1327
+ well_core = well_core ,
1328
+ radius = 1.0 ,
1329
+ z_offset = 4.56 ,
1330
+ speed = 7.89 ,
1331
+ mm_from_edge = 9.87 ,
1332
+ )
1333
+
1334
+ decoy .verify (
1335
+ pipette_movement_conflict .check_safe_for_pipette_movement (
1336
+ engine_state = mock_engine_client .state ,
1337
+ pipette_id = "abc123" ,
1338
+ labware_id = "123abc" ,
1339
+ well_name = "my cool well" ,
1340
+ well_location = WellLocation (
1341
+ origin = WellOrigin .TOP , offset = WellOffset (x = 0 , y = 0 , z = 4.56 )
1342
+ ),
1343
+ ),
1344
+ mock_engine_client .execute_command (
1345
+ cmd .TouchTipParams (
1346
+ pipetteId = "abc123" ,
1347
+ labwareId = "123abc" ,
1348
+ wellName = "my cool well" ,
1349
+ wellLocation = WellLocation (
1350
+ origin = WellOrigin .TOP , offset = WellOffset (x = 0 , y = 0 , z = 4.56 )
1351
+ ),
1352
+ radius = 1.0 ,
1353
+ speed = 7.89 ,
1354
+ mmFromEdge = 9.87 ,
1355
+ )
1356
+ ),
1357
+ mock_protocol_core .set_last_location (location = location , mount = Mount .LEFT ),
1358
+ )
1359
+
1360
+
1361
+ def test_touch_tip_raises_with_radius_and_mm_from_edge (
1362
+ decoy : Decoy ,
1363
+ subject : InstrumentCore ,
1364
+ mock_engine_client : EngineClient ,
1365
+ mock_protocol_core : ProtocolCore ,
1366
+ ) -> None :
1367
+ """It should raise if a value of not 1.0 and a mm_from_edge argument is given."""
1368
+ location = Location (point = Point (1 , 2 , 3 ), labware = None )
1369
+
1370
+ well_core = WellCore (
1371
+ name = "my cool well" , labware_id = "123abc" , engine_client = mock_engine_client
1372
+ )
1373
+ with pytest .raises (ValueError ):
1374
+ subject .touch_tip (
1375
+ location = location ,
1376
+ well_core = well_core ,
1377
+ radius = 1.23 ,
1378
+ z_offset = 4.56 ,
1379
+ speed = 7.89 ,
1380
+ mm_from_edge = 9.87 ,
1381
+ )
1382
+
1383
+
1312
1384
def test_has_tip (
1313
1385
decoy : Decoy ,
1314
1386
subject : InstrumentCore ,
0 commit comments