From f4b8f31131ecdca047625dee330d6688c1c9f5eb Mon Sep 17 00:00:00 2001 From: fis Date: Sat, 18 Dec 2021 05:42:18 +0800 Subject: [PATCH] Update tests. --- tests/python/test_updaters.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/python/test_updaters.py b/tests/python/test_updaters.py index 0bdbb703090a..2af485676016 100644 --- a/tests/python/test_updaters.py +++ b/tests/python/test_updaters.py @@ -45,14 +45,20 @@ def test_exact(self, param, num_rounds, dataset): result = train_result(param, dataset.get_dmat(), num_rounds) assert tm.non_increasing(result['train'][dataset.metric]) - @given(exact_parameter_strategy, strategies.integers(1, 20), - tm.dataset_strategy) + @given( + exact_parameter_strategy, + hist_parameter_strategy, + strategies.integers(1, 20), + tm.dataset_strategy, + ) @settings(deadline=None) - def test_approx(self, param, num_rounds, dataset): - param['tree_method'] = 'approx' + def test_approx(self, param, hist_param, num_rounds, dataset): + param["tree_method"] = "approx" param = dataset.set_params(param) + param.update(hist_param) result = train_result(param, dataset.get_dmat(), num_rounds) - assert tm.non_increasing(result['train'][dataset.metric], 1e-3) + note(result) + assert tm.non_increasing(result["train"][dataset.metric]) @pytest.mark.skipif(**tm.no_sklearn()) def test_pruner(self):