| Total Complexity | 1 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 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 |