# Path: geomdl/CPGen.py
# class Grid(object):
# class GridWeighted(Grid):
#     def __init__(self, size_x, size_y, **kwargs):
#     def __len__(self):
#     def grid(self):
#     def reset(self):
#     def generate(self, num_u, num_v):
#     def bumps(self, num_bumps, **kwargs):
#     def _check_bump(self, uv_list, to_be_checked_uv, base_extent, padding):
#     def _create_bump(self, u, v, jump, height):
#     def __init__(self, size_x, size_y, **kwargs):
#     def weight(self):
#     def weight(self, value):
#     def reset(self):
#     def grid(self):


import pytest
from geomdl import CPGen
def grid():
    """ Generates a 3x4 control points grid """
    surfgrid = CPGen.Grid(7, 13)
    surfgrid.generate(3, 4)
    return surfgrid


@pytest.fixture
def grid2():
    """ Generates a 6x6 control points grid """
    surfgrid = CPGen.Grid(7, 13)
    surfgrid.generate(16, 16)
    return surfgrid


@pytest.fixture
def gridw():
    """ Generates a weighted control points grid """
    surfgrid = CPGen.GridWeighted(7, 13)
    surfgrid.generate(3, 4)
    return surfgrid


def test_grid_generate1():
    test_grid = CPGen.GridWeighted(7, 13)
    with pytest.raises(ValueError):
        test_grid.generate(-1, 5)


def test_grid_generate2():

# Path: geomdl/CPGen.py
# class Grid(object):
# class GridWeighted(Grid):
#     def __init__(self, size_x, size_y, **kwargs):
#     def __len__(self):
#     def grid(self):
#     def reset(self):
#     def generate(self, num_u, num_v):
#     def bumps(self, num_bumps, **kwargs):
#     def _check_bump(self, uv_list, to_be_checked_uv, base_extent, padding):
#     def _create_bump(self, u, v, jump, height):
#     def __init__(self, size_x, size_y, **kwargs):
#     def weight(self):
#     def weight(self, value):
#     def reset(self):
#     def grid(self):


# Path: tests/test_surfgen.py
import pytest
from geomdl import CPGen

def grid():
    """ Generates a 3x4 control points grid """
    surfgrid = CPGen.Grid(7, 13)
    surfgrid.generate(3, 4)
    return surfgrid


@pytest.fixture
def grid2():
    """ Generates a 6x6 control points grid """
    surfgrid = CPGen.Grid(7, 13)
    surfgrid.generate(16, 16)
    return surfgrid


@pytest.fixture
def gridw():
    """ Generates a weighted control points grid """
    surfgrid = CPGen.GridWeighted(7, 13)
    surfgrid.generate(3, 4)
    return surfgrid


def test_grid_generate1():
    test_grid = CPGen.GridWeighted(7, 13)
    with pytest.raises(ValueError):
        test_grid.generate(-1, 5)


def test_grid_generate2():

    test_grid = CPGen.GridWeighted(7, 13)