Code Duplication    Length = 12-13 lines in 2 locations

tests/test_initializers.py 2 locations

@@ 83-95 (lines=13) @@
80
    assert abs(opt.best_score) < 0.001
81
82
83
def test_initialize_grid_1():
84
    search_space = {
85
        "x1": np.arange(-2, 3, 1),
86
    }
87
88
    initialize = {"grid": 1}
89
90
    opt = RandomSearchOptimizer(search_space, initialize=initialize)
91
    opt.search(objective_function, n_iter=1)
92
93
    assert abs(opt.best_score) - 1 < 0.001
94
@@ 71-82 (lines=12) @@
68
    assert abs(opt.best_score) - 10000 < 0.001
69
70
71
def test_initialize_grid_0():
72
    search_space = {
73
        "x1": np.arange(-1, 2, 1),
74
    }
75
    initialize = {"grid": 1}
76
77
    opt = RandomSearchOptimizer(search_space, initialize=initialize)
78
    opt.search(objective_function, n_iter=1)
79
80
    assert abs(opt.best_score) < 0.001
81
82
83
def test_initialize_grid_1():
84
    search_space = {
85
        "x1": np.arange(-2, 3, 1),