class_docstr: Tests for the `HyperbandBracket` class.
class_docstr_tok: ["Tests","for","the","`","HyperbandBracket","`","class","."]
docstr: Check that a point is correctly registered inside a bracket.
docstr_tok: ["Check","that","a","point","is","correctly","registered","inside","a","bracket","."]
code: def test_register(
      self, hyperband: Hyperband, bracket: HyperbandBracket
  ):
      """Check that a point is correctly registered inside a bracket."""
      assert bracket.owner is hyperband
      trial = create_trial_for_hb((1, 0.0), 0.0)
      trial_id = hyperband.get_id(trial, ignore_fidelity=True)
  
      bracket.register(trial)
  
      assert len(bracket.rungs[0])
      assert trial_id in bracket.rungs[0]["results"]
      assert trial.objective is not None
      assert (
          bracket.rungs[0]["results"][trial_id][0]
          == trial.objective.value
      )
      assert (
          bracket.rungs[0]["results"][trial_id][1].to_dict()
          == trial.to_dict()
      )
  
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 2 for calling the TestHyperbandBracket obj's underlying member method code with example usage: obj.test_register(hyperband, bracket) without return types