Skip to content

Commit

Permalink
sets Pipette.previous_placeable to None every time instrument mover i…
Browse files Browse the repository at this point in the history
…s homed or retracted
  • Loading branch information
andySigler committed Feb 14, 2018
1 parent ec1f148 commit ff57a2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions api/opentrons/instruments/pipette.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,7 @@ def _pick_up_tip(
self._add_tip(
length=self.robot.config.tip_length[self.mount][self.type]
)
self.previous_placeable = None # no longer inside a placeable
self.robot.poses = self.instrument_mover.fast_home(
self.robot.poses, abs(plunge_depth))

Expand Down Expand Up @@ -1047,6 +1048,7 @@ def _home(mount):
self.robot.poses = self.instrument_actuator.home(
self.robot.poses)
self.robot.poses = self.instrument_mover.home(self.robot.poses)
self.previous_placeable = None # no longer inside a placeable

_home(self.mount)
return self
Expand Down
4 changes: 3 additions & 1 deletion api/tests/opentrons/labware/test_pipette.py
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,8 @@ def test_mix_with_named_args(self):
self.p200.dispense = mock.Mock()
self.p200.mix(volume=50, repetitions=2)

print(self.p200.tip_racks)

self.assertEqual(
self.p200.dispense.mock_calls,
[
Expand All @@ -1496,7 +1498,7 @@ def test_mix_with_named_args(self):
self.p200.aspirate.mock_calls,
[
mock.call.aspirate(volume=50,
location=self.p200.tip_racks[0][0],
location=None,
rate=1.0),
mock.call.aspirate(50, rate=1.0)
]
Expand Down

0 comments on commit ff57a2d

Please sign in to comment.