Code Duplication    Length = 13-14 lines in 2 locations

tests/test_initializers.py 2 locations

@@ 77-90 (lines=14) @@
74
    assert abs(hyper.best_score(objective_function)) < 0.001
75
76
77
def test_initialize_grid_1():
78
    search_space = {
79
        "x1": np.arange(-2, 3, 1),
80
    }
81
82
    initialize = {"grid": 1}
83
84
    hyper = Hyperactive()
85
    hyper.add_search(
86
        objective_function, search_space, n_iter=1, initialize=initialize,
87
    )
88
    hyper.run()
89
90
    assert abs(hyper.best_score(objective_function)) - 1 < 0.001
91
92
93
def test_initialize_all_0():
@@ 62-74 (lines=13) @@
59
    assert abs(hyper.best_score(objective_function)) - 10000 < 0.001
60
61
62
def test_initialize_grid_0():
63
    search_space = {
64
        "x1": np.arange(-1, 2, 1),
65
    }
66
    initialize = {"grid": 1}
67
68
    hyper = Hyperactive()
69
    hyper.add_search(
70
        objective_function, search_space, n_iter=1, initialize=initialize,
71
    )
72
    hyper.run()
73
74
    assert abs(hyper.best_score(objective_function)) < 0.001
75
76
77
def test_initialize_grid_1():