@@ -1078,11 +1078,11 @@ def test_ensure_location_not_occupied_raises(
1078
1078
@pytest .mark .parametrize (
1079
1079
argnames = ["location" , "expected_center_point" ],
1080
1080
argvalues = [
1081
- (DeckSlotLocation (slotName = DeckSlotName .SLOT_1 ), Point (101.0 , 102.0 , 119.5 )),
1082
- (ModuleLocation (moduleId = "module-id" ), Point (111.0 , 122.0 , 149.5 )),
1081
+ (DeckSlotLocation (slotName = DeckSlotName .SLOT_1 ), Point (101.0 , 102.0 , 203 )),
1082
+ (ModuleLocation (moduleId = "module-id" ), Point (111.0 , 122.0 , 233 )),
1083
1083
],
1084
1084
)
1085
- def test_get_labware_center (
1085
+ def test_get_labware_grip_point (
1086
1086
decoy : Decoy ,
1087
1087
labware_view : LabwareView ,
1088
1088
module_view : ModuleView ,
@@ -1091,10 +1091,10 @@ def test_get_labware_center(
1091
1091
location : Union [DeckSlotLocation , ModuleLocation ],
1092
1092
expected_center_point : Point ,
1093
1093
) -> None :
1094
- """It should get the center point of the labware at the specified location."""
1095
- decoy .when (labware_view . get_dimensions ( labware_id = "labware-id" )). then_return (
1096
- Dimensions ( x = 11 , y = 22 , z = 33 )
1097
- )
1094
+ """It should get the grip point of the labware at the specified location."""
1095
+ decoy .when (
1096
+ labware_view . get_grip_height_from_labware_bottom ( "labware-id" )
1097
+ ). then_return ( 100 )
1098
1098
1099
1099
if isinstance (location , ModuleLocation ):
1100
1100
decoy .when (labware_view .get_deck_definition ()).then_return (
@@ -1113,21 +1113,21 @@ def test_get_labware_center(
1113
1113
decoy .when (labware_view .get_slot_center_position (DeckSlotName .SLOT_1 )).then_return (
1114
1114
Point (x = 101 , y = 102 , z = 103 )
1115
1115
)
1116
- labware_center = subject .get_labware_center (
1116
+ labware_center = subject .get_labware_grip_point (
1117
1117
labware_id = "labware-id" , location = location
1118
1118
)
1119
1119
1120
1120
assert labware_center == expected_center_point
1121
1121
1122
1122
1123
- def test_get_labware_center_on_labware (
1123
+ def test_get_labware_grip_point_on_labware (
1124
1124
decoy : Decoy ,
1125
1125
labware_view : LabwareView ,
1126
1126
module_view : ModuleView ,
1127
1127
ot2_standard_deck_def : DeckDefinitionV3 ,
1128
1128
subject : GeometryView ,
1129
1129
) -> None :
1130
- """It should get the center point of a labware on another labware."""
1130
+ """It should get the grip point of a labware on another labware."""
1131
1131
decoy .when (labware_view .get (labware_id = "labware-id" )).then_return (
1132
1132
LoadedLabware (
1133
1133
id = "labware-id" ,
@@ -1145,12 +1145,12 @@ def test_get_labware_center_on_labware(
1145
1145
)
1146
1146
)
1147
1147
1148
- decoy .when (labware_view .get_dimensions ("labware-id" )).then_return (
1149
- Dimensions (x = 500 , y = 5001 , z = 10 )
1150
- )
1151
1148
decoy .when (labware_view .get_dimensions ("below-id" )).then_return (
1152
1149
Dimensions (x = 1000 , y = 1001 , z = 11 )
1153
1150
)
1151
+ decoy .when (
1152
+ labware_view .get_grip_height_from_labware_bottom ("labware-id" )
1153
+ ).then_return (100 )
1154
1154
decoy .when (
1155
1155
labware_view .get_labware_overlap_offsets ("labware-id" , "below-name" )
1156
1156
).then_return (OverlapOffset (x = 0 , y = 1 , z = 6 ))
@@ -1159,11 +1159,11 @@ def test_get_labware_center_on_labware(
1159
1159
Point (x = 5 , y = 9 , z = 10 )
1160
1160
)
1161
1161
1162
- labware_center = subject .get_labware_center (
1162
+ grip_point = subject .get_labware_grip_point (
1163
1163
labware_id = "labware-id" , location = OnLabwareLocation (labwareId = "below-id" )
1164
1164
)
1165
1165
1166
- assert labware_center == Point (5 , 10 , 20 )
1166
+ assert grip_point == Point (5 , 10 , 115.0 )
1167
1167
1168
1168
1169
1169
@pytest .mark .parametrize (
0 commit comments