def pytest_generate_tests(metafunc):
    """
    Build a list of test arguments for test_hist.

    Run a full but slow set if --all is specified as a py.test arg, or just
    run sanity tests otherwise.
    """
    # sanity tests
    bin_offs = [(64, -48),
                (32, 0)]
    dims = [(64, 32768),
            (64, 1)]
    dtypes = [np.float32, np.uint8]
    inputs = [
        ("normal dist", lambda dim: np.random.normal(64, 4, dim[0] * dim[1]).reshape(dim)),
    ]

    # more thorough tests for CI coverage
    if metafunc.config.option.all:

        bin_offs.extend([(64, -32),
                         (32, -16)])

        dims.extend([
            (64, 387200),
            (128, 128),
            (2, 32),
            (1, 1),
        ])

        dtypes.extend([
            np.float16,
            np.int8,
        ])

        # disabled this just so there are less tests.
        # there is some cuda driver init/destroy issue preventing memory being freed
        # between runs, so having more than a certain number of tests run fails
        # inputs.extend([
        #      ("ones", lambda dim: np.ones(dim)),
        # ])

    if 'nbin_offset_dim_dtype_inp' in metafunc.fixturenames:
        fargs = itt.product(bin_offs, dims, dtypes, inputs)
        metafunc.parametrize("nbin_offset_dim_dtype_inp", fargs)
dataset/ETHPy150Open NervanaSystems/neon/neon/backends/tests/test_hist.py/pytest_generate_tests/original