class_docstr: Tests for the `HyperbandBracket` class.
class_docstr_tok: ["Tests","for","the","`","HyperbandBracket","`","class","."]
docstr: Test that get_candidate gives us the next best thing if point is already in rung 1.
docstr_tok: ["Test","that","get_candidate","gives","us","the","next","best","thing","if","point","is","already","in","rung","1","."]
code: def test_promotion_with_rung_1_hit(
      self,
      hyperband: Hyperband,
      bracket: HyperbandBracket,
      rung_0: RungDict,
  ):
      """Test that get_candidate gives us the next best thing if point is already in rung 1."""
      trial = create_trial_for_hb((1, 0.0), None)
      assert bracket.owner is hyperband
      bracket.rungs[0] = rung_0
      assert trial.objective is not None
      bracket.rungs[1]["results"][
          hyperband.get_id(trial, ignore_fidelity=True)
      ] = (
          trial.objective.value,
          trial,
      )
  
      trials = bracket.get_candidates(0)
  
      assert trials[0].params == create_trial_for_hb((1, 1), 0.0).params
  
imports: from __future__ import annotations
  import copy
  import logging
  import typing
  from typing import Any, ClassVar, Sequence
  import numpy
  import pytest
  from orion.algo.hyperband import BudgetTuple, Hyperband, HyperbandBracket, RungDict, compute_budgets
  from orion.algo.space import Fidelity, Integer, Real, Space
  from orion.core.utils.flatten import flatten
  from orion.core.worker.primary_algo import SpaceTransform
  from orion.core.worker.trial import Trial
  from orion.testing.algo import BaseAlgoTests, TestPhase
  from orion.testing.trial import compare_trials, create_trial
label_desc: Use image node_id 5 for calling the TestHyperbandBracket obj's underlying member method code with example usage: obj.test_promotion_with_rung_1_hit(hyperband, bracket, rung_0) without return types