Code Duplication    Length = 14-14 lines in 2 locations

tests/test_initializers.py 2 locations

@@ 46-59 (lines=14) @@
43
    assert opt.best_para == init
44
45
46
def test_initialize_warm_start_2():
47
    search_space = {
48
        "x1": np.arange(-10, 10, 1),
49
    }
50
    init = {
51
        "x1": -10,
52
    }
53
54
    initialize = {"warm_start": [init], "random": 0, "vertices": 0, "grid": 0}
55
56
    opt = RandomSearchOptimizer(search_space, initialize=initialize)
57
    opt.search(objective_function, n_iter=1)
58
59
    assert opt.best_para == init
60
61
62
def test_initialize_vertices():
@@ 30-43 (lines=14) @@
27
    assert abs(opt.best_score) < 0.001
28
29
30
def test_initialize_warm_start_1():
31
    search_space = {
32
        "x1": np.arange(-10, 10, 1),
33
    }
34
    init = {
35
        "x1": -10,
36
    }
37
38
    initialize = {"warm_start": [init]}
39
40
    opt = RandomSearchOptimizer(search_space, initialize=initialize)
41
    opt.search(objective_function, n_iter=1)
42
43
    assert opt.best_para == init
44
45
46
def test_initialize_warm_start_2():