Passed
Push — master ( 502a6e...660aa4 )
by Simon
04:50 queued 14s
created

tests.test_optimizers.test_parameter.test_grid_search_para_init   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_grid_search_para() 0 3 1
1
# Author: Simon Blanke
2
# Email: [email protected]
3
# License: MIT License
4
5
import pytest
6
7
8
from gradient_free_optimizers import GridSearchOptimizer
9
from ._base_para_test import _base_para_test_func
10
11
12
grid_search_para = [
13
    ({"step_size": 1}),
14
    ({"step_size": 10}),
15
    ({"step_size": 10000}),
16
    ({"direction": "diagonal"}),
17
    ({"direction": "orthogonal"}),
18
]
19
20
21
pytest_wrapper = ("opt_para", grid_search_para)
22
23
24
@pytest.mark.parametrize(*pytest_wrapper)
25
def test_grid_search_para(opt_para):
26
    _base_para_test_func(opt_para, GridSearchOptimizer)
27