class_docstr: Tests for the AlgoWrapper that makes suggest try repeatedly until a new trial is returned.
class_docstr_tok: ["Tests","for","the","AlgoWrapper","that","makes","suggest","try","repeatedly","until","a","new","trial","is","returned","."]
docstr: Test that when the wrapped algo reaches the `done` stage, the `InsistSuggest` wrapper
  stops asking for new trials.
docstr_tok: ["Test","that","when","the","wrapped","algo","reaches","the","`","done","`","stage",",","the","`","InsistSuggest","`","wrapper","stops","asking","for","new","trials","."]
code: def test_doesnt_insist_when_wrapped_algo_is_done(self):
      """Test that when the wrapped algo reaches the `done` stage, the `InsistSuggest` wrapper
      stops asking for new trials.
      """
  
      space = SpaceBuilder().build(
          {"x": "uniform(1, 10, discrete=True)"}
      )
      algo = Random(space=space)
      algo_wrapper = InsistSuggest(space=space, algorithm=algo)
      algo.max_trials = 10
      assert algo_wrapper.max_trials == 10
      trials = algo_wrapper.suggest(100)
      assert len(trials) == 10
      assert algo_wrapper.is_done
      assert algo_wrapper.n_suggested == 10
  
file_path: orion/tests/unittests/core/worker/algo_wrappers/test_insist_suggest.py
imports: from __future__ import annotations
  import logging
  from typing import ClassVar
  import pytest
  from pytest import MonkeyPatch
  from orion.algo.random import Random
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.worker.algo_wrappers import InsistSuggest
  from orion.core.worker.trial import Trial
  from .base import AlgoWrapperTests
  from .test_transform import FixedSuggestionAlgo
label_desc: Use image node_id 4 for calling the TestInsistSuggestWrapper obj's underlying member method code with example usage: obj.test_doesnt_insist_when_wrapped_algo_is_done() without return types