def test_redimension():
    d = Dimensions()
    d.add_dimensions(4, 4)
    d.add_dimensions(2, 4)
    l = NKLandscape(d, K=0)
    x = l.data
    # This should work
    x.shape = d.axes
def f_tiny_landscape():
    """A small landscape for fast tests"""
    d = Dimensions()
    d.add_dimensions(2, 5)
    return NKLandscape(d)
def f_dimensions(request):
    """Generate a bunch of different dimensions for testing landscapes"""
    dims = Dimensions()
    for d in request.param:
        dims.add_dimensions(*d)
    return dims
def test_boolean_dimensions():
    d = Dimensions()
    d.add_dimensions(2, 5)
    assert d.axes == [2] * 5