Code Duplication    Length = 20-20 lines in 2 locations

tests/test_api/test_results.py 2 locations

@@ 134-153 (lines=20) @@
131
        search_data["eval_times"]
132
133
134
def test_attributes_results_8():
135
    def objective_function(opt):
136
        score = -opt["x1"] * opt["x1"]
137
        return score
138
139
    search_space = {
140
        "x1": list(np.arange(0, 10, 1)),
141
    }
142
143
    hyper = HillClimbingOptimizer()
144
    hyper.add_search(
145
        experiment,
146
        search_config,
147
        n_iter=20,
148
    )
149
    hyper.run()
150
151
    search_data = hyper.search_data(experiment)
152
    with pytest.raises(Exception) as e_info:
153
        search_data["iter_times"]
154
155
156
def test_attributes_results_9():
@@ 112-131 (lines=20) @@
109
    assert len(set(x1_results)) < len(x1_results)
110
111
112
def test_attributes_results_7():
113
    def objective_function(opt):
114
        score = -opt["x1"] * opt["x1"]
115
        return score
116
117
    search_space = {
118
        "x1": list(np.arange(0, 10, 1)),
119
    }
120
121
    hyper = HillClimbingOptimizer()
122
    hyper.add_search(
123
        experiment,
124
        search_config,
125
        n_iter=20,
126
    )
127
    hyper.run()
128
129
    search_data = hyper.search_data(experiment)
130
    with pytest.raises(Exception) as e_info:
131
        search_data["eval_times"]
132
133
134
def test_attributes_results_8():