def test_panzoom_pan_keyboard(qtbot, canvas_pz, panzoom):
    c = canvas_pz
    pz = panzoom

    # Pan with keyboard.
    c.events.key_press(key=keys.UP)
    assert pz.pan[0] == 0
    assert 0 < pz.pan[1]

    # All panning movements with keys.
    c.events.key_press(key=keys.LEFT)
    c.events.key_press(key=keys.DOWN)
    c.events.key_press(key=keys.RIGHT)
    assert pz.pan == [0, 0]

    # Reset with R.
    c.events.key_press(key=keys.RIGHT)
    c.events.key_press(key=keys.Key('r'))
    assert pz.pan == [0, 0]

    # Using modifiers should not pan.
    c.events.key_press(key=keys.UP, modifiers=(keys.CONTROL,))
    assert pz.pan == [0, 0]

    # Disable keyboard pan.
    pz.enable_keyboard_pan = False
    c.events.key_press(key=keys.UP, modifiers=(keys.CONTROL,))
    assert pz.pan == [0, 0]
dataset/ETHPy150Open kwikteam/phy/phy/plot/tests/test_panzoom.py/test_panzoom_pan_keyboard/swapped operands of `<`