Skip to content

Commit

Permalink
fix(api): allow double remove tip (#14224)
Browse files Browse the repository at this point in the history

This seems like a logic problem with how we track tip state, but
removing this check (which is really a nebulous "might be using it
wrong" check) we fix some incorrect errors in the drop tip wizard.
  • Loading branch information
sfoster1 authored Dec 15, 2023
1 parent 4da8206 commit 8c82d7c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ def remove_tip(self) -> None:
Remove the tip from the pipette (effectively updates the pipette's
critical point)
"""
assert self.has_tip
self._has_tip = False
self._current_tip_length = 0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,6 @@ def remove_tip(self) -> None:
Remove the tip from the pipette (effectively updates the pipette's
critical point)
"""
assert self.has_tip_length
self._current_tip_length = 0.0
self._has_tip_length = False

Expand Down
6 changes: 2 additions & 4 deletions api/tests/opentrons/hardware_control/test_pipette.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ def test_tip_tracking(
model: Union[str, pipette_definition.PipetteModelVersionType],
) -> None:
hw_pipette = pipette_builder(model)
with pytest.raises(AssertionError):
hw_pipette.remove_tip()
hw_pipette.remove_tip()
assert not hw_pipette.has_tip
tip_length = 25.0
hw_pipette.add_tip(tip_length)
Expand All @@ -95,8 +94,7 @@ def test_tip_tracking(
hw_pipette.add_tip(tip_length)
hw_pipette.remove_tip()
assert not hw_pipette.has_tip
with pytest.raises(AssertionError):
hw_pipette.remove_tip()
hw_pipette.remove_tip()


@pytest.mark.parametrize(
Expand Down

0 comments on commit 8c82d7c

Please sign in to comment.