def test_tip_tracking_chain_multi_channel(local_test_pipette, robot):
    trash, tiprack1, tiprack2, plate, p200 = local_test_pipette
    # TODO (ben 20171130): revise this test to make more sense in the
    # context of required tip pick_up/drop sequencing, etc.

    p200_multi = Pipette(
        robot,
        trash_container=trash,
        tip_racks=[tiprack1, tiprack2],
        max_volume=200,
        min_volume=10,  # These are variable
        mount='right',
        channels=8,
        ul_per_mm=18.5)

    p200_multi.calibrate_plunger(top=0, bottom=10, blow_out=12, drop_tip=13)
    p200_multi.move_to = mock.Mock()

    for _ in range(0, 12 * 2):
        p200_multi.pick_up_tip()
        p200_multi.tip_attached = False  # prior expectation, for test only

    expected = []
    for i in range(0, 12):
        expected.extend(build_pick_up_tip(p200_multi, tiprack1.cols[i]))
    for i in range(0, 12):
        expected.extend(build_pick_up_tip(p200_multi, tiprack2.cols[i]))

    assert p200_multi.move_to.mock_calls == expected
def local_test_pipette(robot):
    trash = containers_load(robot, 'point', '1')
    tiprack1 = containers_load(robot, 'tiprack-10ul', '5')
    tiprack2 = containers_load(robot, 'tiprack-10ul', '8')

    plate = containers_load(robot, '96-flat', '4')

    p200 = Pipette(
        robot,
        ul_per_mm=18.5,
        trash_container=trash,
        tip_racks=[tiprack1, tiprack2],
        max_volume=200,
        min_volume=10,  # These are variable
        mount='left',
        channels=1,
        name='other-pipette-for-transfer-tests')

    p200.reset()

    p200.calibrate_plunger(top=0, bottom=10, blow_out=12, drop_tip=13)
    robot.home()
    return trash, tiprack1, tiprack2, plate, p200