Skip to content

Commit

Permalink
added geometry test
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoegenburg committed Oct 17, 2024
1 parent 618e92f commit fb8a20c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/src/opentrons/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def magnitude_to(self, other: Any) -> float:

class Location:
"""Location(point: Point, labware: Union["Labware", "Well", str, "ModuleGeometry", LabwareLike, None, "ModuleContext"])
A location to target as a motion.
The location contains a :py:class:`.Point` (in
Expand Down
25 changes: 25 additions & 0 deletions api/tests/opentrons/protocol_engine/state/test_geometry_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,31 @@ def test_get_relative_well_location(
)


def test_get_relative_liquid_handling_well_location(
decoy: Decoy,
well_plate_def: LabwareDefinition,
mock_labware_view: LabwareView,
mock_addressable_area_view: AddressableAreaView,
subject: GeometryView,
) -> None:
"""It should get the relative location of a well given an absolute position."""
result = subject.get_relative_liquid_handling_well_location(
labware_id="labware-id",
well_name="B2",
absolute_point=Point(x=0, y=0, z=-2),
is_meniscus=True,
)

assert result == LiquidHandlingWellLocation(
origin=WellOrigin.MENISCUS,
offset=WellOffset.construct(
x=0.0,
y=0.0,
z=cast(float, pytest.approx(-2)),
),
)


def test_get_nominal_effective_tip_length(
decoy: Decoy,
mock_labware_view: LabwareView,
Expand Down

0 comments on commit fb8a20c

Please sign in to comment.