def METHOD_NAME():
    """Test zooming with X and Y limits set"""
    vb = pg.ViewBox()
    vb.setLimits(xMin=0, xMax=10, yMin=0, yMax=10)
    # Try zooming within limits. Should return unmodified
    testRange = pg.QtCore.QRect(0, 0, 9, 9)
    vb.setRange(testRange, padding=0)
    vbViewRange = vb.getState()['viewRange']
    assert vbViewRange == [[testRange.left(), testRange.right()],
                           [testRange.top(), testRange.bottom()]]
    # And outside limits. both view range and targetRange should be set to limits
    testRange = pg.QtCore.QRect(-5, -5, 16, 20)
    vb.setRange(testRange, padding=0)
    expected = [[0, 10], [0, 10]]
    vbState = vb.getState()
    assert vbState['targetRange'] == expected
    assert vbState['viewRange'] == expected