Skip to content

Commit

Permalink
fix tests for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Jul 16, 2024
1 parent 2ff2cc6 commit fc35739
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
8 changes: 4 additions & 4 deletions api/tests/opentrons/hardware_control/test_ot3_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ async def test_liquid_probe(
)
fake_max_z_dist = 10.0
await ot3_hardware.liquid_probe(mount, fake_max_z_dist, fake_settings_aspirate)
mock_move_to_plunger_bottom.assert_called_once()
mock_move_to_plunger_bottom.call_count == 2
mock_liquid_probe.assert_called_once_with(
mount,
3.0,
Expand Down Expand Up @@ -910,7 +910,7 @@ async def test_multi_liquid_probe(
await ot3_hardware.liquid_probe(
OT3Mount.LEFT, fake_max_z_dist, fake_settings_aspirate
)
assert mock_move_to_plunger_bottom.call_count == 3
assert mock_move_to_plunger_bottom.call_count == 4
mock_liquid_probe.assert_called_with(
OT3Mount.LEFT,
plunger_positions.bottom - plunger_positions.top,
Expand Down Expand Up @@ -986,8 +986,8 @@ async def _fake_pos_update_and_raise(
await ot3_hardware.liquid_probe(
OT3Mount.LEFT, fake_max_z_dist, fake_settings_aspirate
)
# assert that it went through 3 passes
assert mock_move_to_plunger_bottom.call_count == 3
# assert that it went through 3 passes and then prepared to aspirate
assert mock_move_to_plunger_bottom.call_count == 4


@pytest.mark.parametrize(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1340,12 +1340,7 @@ def test_liquid_probe_without_recovery(
)
).then_raise(PipetteLiquidNotFoundError())
loc = Location(Point(0, 0, 0), None)
try:
subject.liquid_probe_without_recovery(well_core=well_core, loc=loc)
except PipetteLiquidNotFoundError:
assert True
else:
assert False
subject.liquid_probe_without_recovery(well_core=well_core, loc=loc)


@pytest.mark.parametrize("version", versions_at_or_above(APIVersion(2, 20)))
Expand All @@ -1367,7 +1362,7 @@ def test_liquid_probe_with_recovery(
cmd.LiquidProbeParams(
pipetteId=subject.pipette_id,
wellLocation=WellLocation(
origin=WellOrigin.TOP, offset=WellOffset(x=0, y=0, z=0)
origin=WellOrigin.TOP, offset=WellOffset(x=0, y=0, z=2.0)
),
wellName=well_core.get_name(),
labwareId=well_core.labware_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def test_liquid_probe_implementation_with_prep(
subject: LiquidProbeImplementation,
) -> None:
"""A Liquid Probe should have an execution implementation with preparing to aspirate."""
location = WellLocation(origin=WellOrigin.TOP, offset=WellOffset(x=0, y=0, z=0))
location = WellLocation(origin=WellOrigin.TOP, offset=WellOffset(x=0, y=0, z=2))

data = LiquidProbeParams(
pipetteId="abc",
Expand Down Expand Up @@ -143,7 +143,7 @@ async def test_liquid_probe_implementation_with_prep(
pipette_id="abc",
labware_id="123",
well_name="A3",
well_location=WellLocation(origin=WellOrigin.TOP),
well_location=WellLocation(origin=WellOrigin.TOP,offset=WellOffset(x=0, y=0, z=2)),
),
)

Expand Down

0 comments on commit fc35739

Please sign in to comment.