Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Sep 26, 2024
1 parent 11f13fb commit 6f70d21
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 2 deletions.
8 changes: 8 additions & 0 deletions api/tests/opentrons/protocol_engine/commands/test_drop_tip.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ async def test_drop_tip_implementation(
well_name="A3",
),
new_deck_point=DeckPoint(x=111, y=222, z=333),
),
pipette_tip_state=update_types.PipetteTipStateUpdate(
pipette_id="abc",
tip_geometry=None
)
),
)
Expand Down Expand Up @@ -196,6 +200,10 @@ async def test_drop_tip_with_alternating_locations(
well_name="A3",
),
new_deck_point=DeckPoint(x=111, y=222, z=333),
),
pipette_tip_state=update_types.PipetteTipStateUpdate(
pipette_id="abc",
tip_geometry=None
)
),
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test drop tip in place commands."""
from opentrons.protocol_engine.state.update_types import PipetteTipStateUpdate, StateUpdate
import pytest
from decoy import Decoy

Expand Down Expand Up @@ -29,7 +30,13 @@ async def test_drop_tip_implementation(

result = await subject.execute(params)

assert result == SuccessData(public=DropTipInPlaceResult(), private=None)
assert result == SuccessData(public=DropTipInPlaceResult(), private=None,
state_update=StateUpdate(
pipette_tip_state=PipetteTipStateUpdate(
pipette_id="abc",
tip_geometry=None
)
))

decoy.verify(
await mock_tip_handler.drop_tip(pipette_id="abc", home_after=False),
Expand Down
19 changes: 19 additions & 0 deletions api/tests/opentrons/protocol_engine/commands/test_load_pipette.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test load pipette commands."""
from opentrons.protocol_engine.state.update_types import LoadPipetteUpdate, StateUpdate
import pytest
from decoy import Decoy

Expand Down Expand Up @@ -88,6 +89,15 @@ async def test_load_pipette_implementation(
private=LoadPipettePrivateResult(
pipette_id="some id", serial_number="some-serial-number", config=config_data
),
state_update=StateUpdate(
loaded_pipette=LoadPipetteUpdate(
pipette_name=PipetteNameType.P300_SINGLE,
mount=MountType.LEFT,
pipette_id="some id",
liquid_presence_detection=None
),
pipette_config=config_data
)
)


Expand Down Expand Up @@ -143,6 +153,15 @@ async def test_load_pipette_implementation_96_channel(
private=LoadPipettePrivateResult(
pipette_id="pipette-id", serial_number="some id", config=config_data
),
state_update=StateUpdate(
loaded_pipette=LoadPipetteUpdate(
pipette_name=PipetteNameType.P300_SINGLE,
mount=MountType.LEFT,
pipette_id="some id",
liquid_presence_detection=None
),
pipette_config=config_data
)
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ async def test_success(
pipette_id="pipette-id",
new_location=update_types.Well(labware_id="labware-id", well_name="A3"),
new_deck_point=DeckPoint(x=111, y=222, z=333),
),
pipette_tip_state=update_types.PipetteTipStateUpdate(
pipette_id="pipette-id",
tip_geometry=TipGeometry(length=42, diameter=5, volume=300)
)
),
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test unsafe drop tip in place commands."""
from opentrons.protocol_engine.state.update_types import PipetteTipStateUpdate, StateUpdate
import pytest
from decoy import Decoy

Expand Down Expand Up @@ -44,7 +45,13 @@ async def test_drop_tip_implementation(

result = await subject.execute(params)

assert result == SuccessData(public=UnsafeDropTipInPlaceResult(), private=None)
assert result == SuccessData(public=UnsafeDropTipInPlaceResult(), private=None,
state_update=StateUpdate(
pipette_tip_state=PipetteTipStateUpdate(
pipette_id="abc",
tip_geometry=None
)
))

decoy.verify(
await ot3_hardware_api.update_axis_position_estimations([Axis.P_L]),
Expand Down

0 comments on commit 6f70d21

Please sign in to comment.