Exemplo n.º 1
0
def test_cec_benchmark_continuous_setter():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    try:
        new_cec_benchmark.continuous = 1
    except:
        new_cec_benchmark.continuous = True

    assert new_cec_benchmark.continuous == True
Exemplo n.º 2
0
def test_cec_benchmark_separable_setter():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    try:
        new_cec_benchmark.separable = 1
    except:
        new_cec_benchmark.separable = True

    assert new_cec_benchmark.separable == True
Exemplo n.º 3
0
def test_cec_benchmark_name_setter():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    try:
        new_cec_benchmark.name = 1
    except:
        new_cec_benchmark.name = 'F1'

    assert new_cec_benchmark.name == 'F1'
Exemplo n.º 4
0
def test_cec_benchmark_multimodal_setter():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    try:
        new_cec_benchmark.multimodal = 1
    except:
        new_cec_benchmark.multimodal = True

    assert new_cec_benchmark.multimodal == True
Exemplo n.º 5
0
def test_cec_benchmark_convex_setter():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    try:
        new_cec_benchmark.convex = 1
    except:
        new_cec_benchmark.convex = True

    assert new_cec_benchmark.convex == True
Exemplo n.º 6
0
def test_cec_benchmark_year_setter():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    try:
        new_cec_benchmark.year = 1
    except:
        new_cec_benchmark.year = '2005'

    assert new_cec_benchmark.year == '2005'
Exemplo n.º 7
0
def test_cec_benchmark_dims_setter():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    try:
        new_cec_benchmark.dims = 'a'
    except:
        new_cec_benchmark.dims = 1

    assert new_cec_benchmark.dims == 1

    try:
        new_cec_benchmark.dims = 0
    except:
        new_cec_benchmark.dims = 1

    assert new_cec_benchmark.dims == 1
Exemplo n.º 8
0
def test_cec_benchmark_convex():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    assert new_cec_benchmark.convex == False
Exemplo n.º 9
0
def test_cec_benchmark_continuous():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    assert new_cec_benchmark.continuous == False
Exemplo n.º 10
0
def test_cec_benchmark_name():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    assert new_cec_benchmark.name == 'F1'
Exemplo n.º 11
0
def test_cec_benchmark_dims():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    assert new_cec_benchmark.dims == 1
Exemplo n.º 12
0
def test_cec_benchmark_year():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    assert new_cec_benchmark.year == '2005'
Exemplo n.º 13
0
def test_cec_benchmark_load_auxiliary_data():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    new_cec_benchmark._load_auxiliary_data('F1', '2005', 'o')

    assert new_cec_benchmark.o.shape == (100,)
Exemplo n.º 14
0
def test_cec_benchmark_call():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    with pytest.raises(NotImplementedError):
        new_cec_benchmark(None)
Exemplo n.º 15
0
def test_cec_benchmark_separable():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    assert new_cec_benchmark.separable == False
Exemplo n.º 16
0
def test_cec_benchmark_differentiable():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    assert new_cec_benchmark.differentiable == False
Exemplo n.º 17
0
def test_cec_benchmark_multimodal():
    new_cec_benchmark = cec_benchmark.CECBenchmark('F1', '2005')

    assert new_cec_benchmark.multimodal == False